Skip to content

Commit

Permalink
chore: create container images for amd64 and arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
nampereira authored Mar 13, 2024
1 parent 2dd5fa3 commit 2d5c339
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,28 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.3
env:
GITHUB_TOKEN: ${{ github.token }}

- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3.0.0

- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3.0.0

- name: 'Get Previous tag'
id: get_tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: latest # Optional fallback tag to use when no tag can be found

- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5.1.0
with:
platforms: linux/amd64,linux/arm64
build-args: |
chash=${{ github.sha }}
version=${{ steps.get_release.outputs.tag_name }}
version=${{ steps.get_tag.outputs.tag }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.repository.name }}, ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.get_release.outputs.tag_name }}
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.repository.name }}, ${{ secrets.DOCKER_HUB_USERNAME }}/${{ github.event.repository.name }}:${{ steps.get_tag.outputs.tag }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 2d5c339

Please sign in to comment.