|
43 | 43 | id-token: write |
44 | 44 |
|
45 | 45 | promote-images: |
46 | | - # Tag every built image with the release's semantic version, by promoting the |
47 | | - # already-tested :<sha> image (no rebuild). One version for the whole platform. |
| 46 | + # Tag every custom image with the release's semantic version, by retagging its |
| 47 | + # current :latest (no rebuild). One version for the whole platform — unchanged |
| 48 | + # images get their existing digest aliased under the new version too. |
48 | 49 | name: Promote images to ${{ needs.release.outputs.version }} |
49 | 50 | needs: release |
50 | 51 | if: needs.release.outputs.released == 'true' |
@@ -74,13 +75,16 @@ jobs: |
74 | 75 | username: ${{ github.actor }} |
75 | 76 | password: ${{ secrets.GITHUB_TOKEN }} |
76 | 77 |
|
77 | | - - name: Promote each image :sha -> :version |
78 | | - # GITHUB_SHA is the released code (the release commit only bumps version/ |
79 | | - # changelog), and build.yml already pushed its :<sha> image. |
| 78 | + - name: Promote each image :latest -> :version |
| 79 | + # Retag every image's current :latest (its most-recent main build, whether |
| 80 | + # or not it changed this cycle) with the release version. Server-side |
| 81 | + # manifest retag — no rebuild, no layer push. Using :latest (not :<sha>) |
| 82 | + # means unchanged images, which were never built at the release commit, |
| 83 | + # still get tagged — so the whole platform ends up on one version. |
80 | 84 | run: | |
81 | 85 | set -euo pipefail |
82 | 86 | for image in $(uv run ci images .); do |
83 | 87 | repo="${REGISTRY}/${REGISTRY_NAMESPACE}/${image}" |
84 | | - docker buildx imagetools create "${repo}:${GITHUB_SHA}" --tag "${repo}:${VERSION}" |
85 | | - echo "Promoted \`${repo}:${VERSION}\` (from \`:${GITHUB_SHA}\`)." >> "$GITHUB_STEP_SUMMARY" |
| 88 | + docker buildx imagetools create "${repo}:latest" --tag "${repo}:${VERSION}" |
| 89 | + echo "Promoted \`${repo}:${VERSION}\` (from \`:latest\`)." >> "$GITHUB_STEP_SUMMARY" |
86 | 90 | done |
0 commit comments