Skip to content

Commit

Permalink
chore(ci): create a multi-arch convenience image (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hutchic authored Dec 6, 2022
1 parent 613bb2b commit 94039bc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,28 @@ jobs:
with:
tag_name: ${{ needs.release.outputs.release-git-tag }}
files: ${{ matrix.architecture }}-${{ matrix.ostype }}.tar.gz

multi-arch:
needs: [release, artifacts]
name: Create Release Artifacts
if: ${{ needs.release.outputs.published == 'true' }}
strategy:
matrix:
ostype: [linux-gnu, linux-musl]
runs-on: ubuntu-latest
steps:
- name: Log in to the Container registry
if: ${{ needs.release.outputs.published == 'true' }}
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Combine per architecture images into a single multi-arch manifest
run: |
docker pull ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }}
docker pull ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
docker manifest create ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }} \
ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-aarch64-${{ matrix.ostype }} \
ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-x86_64-${{ matrix.ostype }}
docker manifest push ghcr.io/kong/kong-runtime:${{ needs.release.outputs.release-git-tag }}-${{ matrix.ostype }}

0 comments on commit 94039bc

Please sign in to comment.