Add QEMU Emulation support and Docker Buildx for multi-architecture builds
This commit is contained in:
parent
33801b5004
commit
776e510c0c
1 changed files with 13 additions and 12 deletions
25
.github/workflows/go-release.yml
vendored
25
.github/workflows/go-release.yml
vendored
|
@ -56,22 +56,23 @@ jobs:
|
||||||
args: release --clean --skip=validate
|
args: release --clean --skip=validate
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
# I added QEMU Emulation support for non-native architectures and also Buildx to enables multi-architecture. not sure if there is better/faster way to do this
|
||||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
# Log in to Docker Hub
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
# Build and tag Docker image
|
- name: Build and push Docker image
|
||||||
- name: Build Docker image
|
uses: docker/build-push-action@v5
|
||||||
run: |
|
with:
|
||||||
docker build -t ${{ secrets.DOCKER_USERNAME }}/donetick:latest .
|
context: .
|
||||||
|
push: true
|
||||||
# Push Docker image
|
tags: ${{ secrets.DOCKER_USERNAME }}/donetick:latest, ${{ secrets.DOCKER_USERNAME }}/donetick:${{ github.ref_name }}
|
||||||
- name: Push Docker image
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
run: |
|
|
||||||
docker push ${{ secrets.DOCKER_USERNAME }}/donetick:latest
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue