1
0
mirror of https://github.com/go-task/task.git synced 2025-01-06 03:53:54 +02:00

added dockerfile and multiarch build job in goreleaser workflow. fixes #1801

This commit is contained in:
Dominik Mähl 2024-10-17 19:41:33 +02:00
parent 9ecc8fc878
commit e494ec2801
No known key found for this signature in database
2 changed files with 36 additions and 0 deletions

View File

@ -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
Dockerfile Normal file
View File

@ -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"]