Skip to content

Commit

Permalink
added dockerfile and multiarch build job in goreleaser workflow. fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Mähl committed Oct 17, 2024
1 parent 9ecc8fc commit e494ec2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,30 @@ jobs:
args: release --clean
env:
GITHUB_TOKEN: ${{secrets.GH_PAT}}

docker:
runs-on: ubuntu-latest
needs: goreleaser
if: ${{ secrets.DOCKER_HUB_USERNAME && secrets.DOCKER_HUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and Push Docker image
uses: docker/build-push-action@v6
platforms: linux/amd64,linux/arm64
with:
context: .
file: ./Dockerfile
push: true
tags: |
go-task/task:latest
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:1.23.2-alpine

COPY . /app

WORKDIR /app

RUN /app/install-task.sh -b /usr/local/bin

ENTRYPOINT ["task"]

0 comments on commit e494ec2

Please sign in to comment.