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:
parent
9ecc8fc878
commit
e494ec2801
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
@ -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
9
Dockerfile
Normal 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"]
|
Loading…
Reference in New Issue
Block a user