Skip to content

Commit

Permalink
ci: generate multiarch manifest for bookworm
Browse files Browse the repository at this point in the history
Since we're building multiple architectures to separate tags, build a
manifest to make them all available under fluxrm/flux-core:bookworm

To avoid a race condition between pushing the amd64 image, normally
called flux-core:bookworm, and pushing the manifest, also named
flux-core:bookworm, add platform to the matrix entry to force it to be
called bookworm-amd64.  The manifest will then make all of 386, arm64
and amd64 images available under the name flux-core:bookworm.
  • Loading branch information
trws committed Aug 17, 2023
1 parent c540b67 commit e6f3d5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,21 @@ jobs:
files: flux-core*.tar.gz
body: |
View [Release Notes](https://github.com/${{ github.repository }}/blob/${{ matrix.tag }}/NEWS.md) for flux-core ${{ matrix.tag }}
generate-manifest:
name: Generate docker manifest
runs-on: ubuntu-latest
needs: [ci-checks]
env:
DOCKER_REPO: fluxrm/flux-core
DOCKER_USERNAME: travisflux
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_TRAVISFLUX_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: make and push manifest as fluxrm/flux-core
if: >
(startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
run: |
docker manifest create fluxrm/flux-core:bookworm fluxrm/flux-core:bookworm-amd64 fluxrm/flux-core:bookworm-386 fluxrm/flux-core:bookworm-arm64
docker manifest push fluxrm/flux-core:bookworm
1 change: 1 addition & 0 deletions src/test/generate-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def __str__(self):
env=dict(
TEST_INSTALL="t",
),
platform="linux/amd64",
docker_tag=True,
)

Expand Down

0 comments on commit e6f3d5e

Please sign in to comment.