Skip to content

Commit 5964de2

Browse files
committed
fix(BA-7269): gate image publication on release success and grant actions:read
Claude-Session: https://claude.ai/code/session_01UX2YfP299F2QMfKwZF8WPT
1 parent a2a4103 commit 5964de2

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
- 'python*.lock'
5757
- 'tools/*.lock'
5858
- '.github/workflows/ci.yml'
59+
- '.github/workflows/docker-images.yml'
5960
6061
6162
check-build-and-lint:
@@ -772,13 +773,17 @@ jobs:
772773
uses: ./.github/workflows/sbom.yml
773774

774775
# Publishes the lablup/backend.ai-* service images from the wheels built in
775-
# this run. Deliberately NOT in make-final-release's `needs`: a Docker Hub
776-
# outage must not block the PyPI/GitHub release.
776+
# this run. Deliberately NOT in make-final-release's `needs`: the release
777+
# never waits for images, so a Docker Hub outage must not block the
778+
# PyPI/GitHub release. The reverse dependency does hold: images wait for a
779+
# successful release so that a failed release cannot publish images (and
780+
# `latest`) for a version that was never released.
777781
build-docker-images:
778-
needs: [build-wheels]
782+
needs: [build-wheels, make-final-release]
779783
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
780784
permissions:
781785
contents: read
786+
actions: read # the called workflow downloads wheel artifacts via the REST API
782787
id-token: write # the called workflow mints the OIDC token for Docker Hub
783788
uses: ./.github/workflows/docker-images.yml
784789

0 commit comments

Comments
 (0)