Skip to content

Commit

Permalink
[+] produce multi platforms images
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Aug 25, 2023
1 parent d2af271 commit 42859fe
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ jobs:
echo "RELEASE_VERSION=$(echo "$GITHUB_REF_NAME#${GITHUB_SHA:0:6}")" >> $GITHUB_OUTPUT
echo "RELEASE_TIME=$(git show -s --format=%cI HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Publish beta version to Registry
if: ${{ contains(github.ref_name, 'beta') }}
uses: elgohr/Publish-Docker-Github-Action@v5
Expand All @@ -62,9 +68,10 @@ jobs:
dockerfile: docker/${{ matrix.image.file }}
buildargs: GIT_HASH,GIT_TIME
tags: ${{ github.ref_name }}${{ matrix.image.tag }}
platforms: linux/amd64,linux/arm64

- name: Publish "latest" tag to Registry
if: ${{ !contains(github.ref_name, 'beta') }}
if: ${{ !contains(github.ref_name, 'beta') && matrix.image.tag == '-demo' }}
uses: elgohr/Publish-Docker-Github-Action@v5
env:
GIT_HASH: ${{ steps.version.outputs.RELEASE_VERSION }}
Expand All @@ -76,6 +83,7 @@ jobs:
dockerfile: docker/${{ matrix.image.file }}
buildargs: GIT_HASH,GIT_TIME
tags: latest${{ matrix.image.tag }}
platforms: linux/amd64,linux/arm64

- name: Publish "X.X.X, X.X, X" tags to Registry
if: ${{ !contains(github.ref_name, 'beta') && matrix.image.tag == '' }}
Expand All @@ -89,4 +97,5 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/${{ matrix.image.file }}
buildargs: GIT_HASH,GIT_TIME
tag_semver: true
tag_semver: true
platforms: linux/amd64,linux/arm64

0 comments on commit 42859fe

Please sign in to comment.