Only use the `release` environment in Docker builds on push (#14189)

This drastically reduces the `release` deployment noise, e.g., as seen
in https://github.com/astral-sh/uv/pull/14165
This commit is contained in:
Zanie Blue 2025-06-21 09:36:07 -05:00 committed by GitHub
parent b18f45db14
commit f0407e4b6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ jobs:
packages: write # for GHCR image pushes
attestations: write # for GHCR attestations
environment:
name: release
name: ${{ needs.docker-plan.outputs.push == 'true' && 'release' || '' }}
outputs:
image-tags: ${{ steps.meta.outputs.tags }}
image-annotations: ${{ steps.meta.outputs.annotations }}
@ -155,7 +155,7 @@ jobs:
name: ${{ needs.docker-plan.outputs.action }} ${{ matrix.image-mapping }}
runs-on: ubuntu-latest
environment:
name: release
name: ${{ needs.docker-plan.outputs.push == 'true' && 'release' || '' }}
needs:
- docker-plan
- docker-publish-base
@ -330,7 +330,7 @@ jobs:
name: annotate uv
runs-on: ubuntu-latest
environment:
name: release
name: ${{ needs.docker-plan.outputs.push == 'true' && 'release' || '' }}
needs:
- docker-plan
- docker-publish-base