Commit 73b637b
Changed files (2)
.github
workflows
.github/workflows/release.yaml
@@ -0,0 +1,31 @@
+name: release
+
+on:
+ release:
+ types: [ created ]
+ workflow_dispatch:
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: antonmedv
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Build and push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ file: ./Dockerfile
+ push: true
+ platforms: linux/amd64,linux/arm64
+ tags: antonmedv/gitmal:latest
Dockerfile
@@ -0,0 +1,21 @@
+FROM golang:latest as builder
+
+WORKDIR /go
+
+COPY go.mod go.sum ./
+
+RUN go mod download
+
+COPY . .
+
+RUN go build -o gitmal .
+
+FROM alpine
+
+COPY --from=builder /go/gitmal /bin/gitmal
+
+WORKDIR /data
+
+ENV COLORTERM=truecolor
+
+ENTRYPOINT ["/bin/gitmal"]