Repository navigation
Conversation
…up architecture tags
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| # Architecture tags must not be overwritten by another run before assembly/cleanup. | ||
| concurrency: | ||
| group: docker-ros-${{ github.ref }} | ||
| cancel-in-progress: false |
There was a problem hiding this comment.
Where does that come from, or why do we need it?
There was a problem hiding this comment.
permissions explicitly allows the token to read repository contents and publish packages. The new manifest job uses GITHUB_TOKEN to push to GHCR, which requires packages: write. Whether this was already granted implicitly depends on repository settings. GitHub docs
concurrency prevents overlapping runs for the same ref from overwriting architecture tags during manifest assembly. Otherwise, a manifest could combine AMD64 from one commit with ARM64 from another. cancel-in-progress: false lets the active build finish. GitHub docs
| manifest: | ||
| needs: docker-ros | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Slugify ref name | ||
| id: slugify-ref-name | ||
| uses: gacts/github-slug@v1 | ||
| with: | ||
| to-slug: ${{ github.head_ref || github.ref_name }} | ||
| - name: Login to GHCR | ||
| uses: docker/login-action@v4 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Set up Docker buildx | ||
| uses: docker/setup-buildx-action@v4 | ||
| - name: Push multi-arch manifests | ||
| shell: bash | ||
| env: | ||
| IMAGE_NAME: ghcr.io/${{ github.repository }} | ||
| IMAGE_TAG: ${{ github.ref_type == 'tag' && github.ref_name || 'latest' }} | ||
| # Match docker-ros's suffix for PRs and non-default branches. | ||
| IMAGE_POSTFIX: ${{ github.ref_type != 'tag' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && format('_{0}_ci', steps.slugify-ref-name.outputs.slug) || '' }} | ||
| run: | | ||
| for suffix in '' '-dev' '-slim'; do | ||
| image="${IMAGE_NAME,,}:${IMAGE_TAG}${suffix}${IMAGE_POSTFIX}" | ||
| docker buildx imagetools create --tag "$image" "${image}-amd64" "${image}-arm64" | ||
| done No newline at end of file |
There was a problem hiding this comment.
It looks to me like this could be integrated quite easily into docker-ros. That would probably be cleaner than copying this block everywhere. Alternatively, we could stick it in the dev-environment, but for now I'd lean toward trying it in docker-ros.
There was a problem hiding this comment.
Actually we'll probably only need the last step here, because the remaining steps are already happening in docker-ros anyway.
There was a problem hiding this comment.
These steps already run inside docker-ros, but in the matrix build jobs. The manifest job runs on a fresh runner, so it needs its own registry login and tooling, plus the branch suffix to find the correct tags. We could potentially use the runner’s preinstalled buildx, but otherwise we need these steps with the current setup.
Build development and runtime images in parallel on native amd64 and arm64 runners. After successful builds, publish multi-architecture manifests for runtime, development, and slim images, then remove temporary architecture tags while preserving the referenced manifests.
Preserve release and PR tag naming, and serialize runs per ref to prevent tag conflicts. Update the manifest job’s Docker actions and rename the deprecated disk-cleanup input.
Also update the dev-environment submodule and regenerate the Helm chart, bumping
openadserviceto 1.3.0.