diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index 21de33825b..6d301a39d1 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -209,26 +209,45 @@ jobs: checkout-ref: ${{ github.sha }} tag-ghcr-dev: - name: Tag GHCR Images as Dev + name: Promote Dev Images to Quay needs: [build-images, release-dev] runs-on: ubuntu-24.04 timeout-minutes: 10 + # Only jobs in this environment can trade their OIDC token for the Quay robot. + environment: release permissions: - packages: write + contents: read + id-token: write + packages: read steps: - - name: Log in to GHCR + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Log in to the CI registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin - - name: Tag images as dev + - name: Log in to Quay + uses: ai-openshell/workflows/quay-login@96e33d5551ba4e706203648eb90710c48466e543 # main + with: + robot: ai-openshell+openshell_release + clients: docker + + # The SHA tag backs the 0.0.0-dev. chart, which pins appVersion to it. + - name: Promote images as dev + env: + SOURCE_SHA: ${{ github.sha }} run: | set -euo pipefail - REGISTRY="ghcr.io/ai-openshell/openshell" + CI_REGISTRY="ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/openshell" for component in gateway sandbox supervisor; do - echo "Tagging ${REGISTRY}/${component}:${{ github.sha }} as dev..." + echo "Promoting ${CI_REGISTRY}/${component}:${SOURCE_SHA} to quay.io/ai-openshell/${component}..." docker buildx imagetools create \ --prefer-index=false \ - -t "${REGISTRY}/${component}:dev" \ - "${REGISTRY}/${component}:${{ github.sha }}" + -t "quay.io/ai-openshell/${component}:${SOURCE_SHA}" \ + -t "quay.io/ai-openshell/${component}:dev" \ + "${CI_REGISTRY}/${component}:${SOURCE_SHA}" + tasks/scripts/verify-image-sbom.sh "quay.io/ai-openshell/${component}:dev" --require-cargo done build-deb: diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 5e101f77ce..08fbefbcca 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -184,17 +184,19 @@ jobs: if-no-files-found: error tag-ghcr-release: - name: Publish GHCR Images + name: Publish Quay Images needs: assemble runs-on: ubuntu-24.04 timeout-minutes: 10 + # Only jobs in this environment can trade their OIDC token for the Quay robot. + environment: release permissions: actions: read contents: read - packages: write + id-token: write + packages: read steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - if: ${{ !inputs.is-prerelease }} with: persist-credentials: false ref: ${{ inputs.source-sha }} @@ -210,9 +212,16 @@ jobs: path: artifacts/ merge-multiple: true - - name: Log in to GHCR + - name: Log in to the CI registry + if: ${{ inputs.is-prerelease }} run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${GITHUB_ACTOR}" --password-stdin + - name: Log in to Quay + uses: ai-openshell/workflows/quay-login@96e33d5551ba4e706203648eb90710c48466e543 # main + with: + robot: ai-openshell+openshell_release + clients: docker + - name: Publish stable image archives if: ${{ !inputs.is-prerelease }} env: @@ -220,7 +229,7 @@ jobs: run: | set -euo pipefail for component in gateway sandbox supervisor; do - image="ghcr.io/nvidia/openshell/${component}:${VERSION}" + image="quay.io/ai-openshell/${component}:${VERSION}" # Never replace a published stable image; a rerun keeps the original. # Only a missing manifest means unpublished; any other lookup error # fails rather than risk overwriting. @@ -264,21 +273,28 @@ jobs: VERSION: ${{ inputs.semver }} run: | set -euo pipefail - REGISTRY="ghcr.io/nvidia/openshell" + REGISTRY="quay.io/ai-openshell" + # Prereleases promote the SHA-tagged build from the CI registry; + # stable images were already published to Quay above. + SOURCE_REGISTRY="${REGISTRY}" + if [[ "${IS_PRERELEASE}" == "true" ]]; then + SOURCE_REGISTRY="ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/openshell" + fi for component in gateway sandbox supervisor; do if [[ "${IS_PRERELEASE}" == "true" ]]; then - echo "Tagging ${REGISTRY}/${component}:${SOURCE_TAG} as ${VERSION}..." + echo "Promoting ${SOURCE_REGISTRY}/${component}:${SOURCE_TAG} as ${REGISTRY}/${component}:${VERSION}..." docker buildx imagetools create \ --prefer-index=false \ -t "${REGISTRY}/${component}:${VERSION}" \ - "${REGISTRY}/${component}:${SOURCE_TAG}" + "${SOURCE_REGISTRY}/${component}:${SOURCE_TAG}" + tasks/scripts/verify-image-sbom.sh "${REGISTRY}/${component}:${VERSION}" --require-cargo fi if [[ "${MAKE_LATEST}" == "true" ]]; then - echo "Tagging ${REGISTRY}/${component}:${SOURCE_TAG} as latest..." + echo "Tagging ${SOURCE_REGISTRY}/${component}:${SOURCE_TAG} as latest..." docker buildx imagetools create \ --prefer-index=false \ -t "${REGISTRY}/${component}:latest" \ - "${REGISTRY}/${component}:${SOURCE_TAG}" + "${SOURCE_REGISTRY}/${component}:${SOURCE_TAG}" fi done