ci: fix CI_BRANCH ternary so PR builds skip upload gate (#1062)

* ci: fix CI_BRANCH ternary so PR builds skip upload gate

Signed-off-by: Andy Lee <andy.lee@suse.com>

* ci: simplify CI_BRANCH expression comment

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee 2026-07-28 14:34:21 +08:00 committed by GitHub
parent a6bd7ec00e
commit 719c33fa12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -38,7 +38,4 @@ jobs:
packages: write
id-token: write
with:
# For PR-triggered runs github.ref_name is "<prNumber>/merge" (not a real
# branch), which breaks the upload gate. Leave CI_BRANCH empty for PRs so
# the gate is skipped; use the real branch name for push events.
CI_BRANCH: ${{ github.event_name == 'pull_request' && '' || github.ref_name }}
CI_BRANCH: ${{ github.event_name == 'push' && github.ref_name || '' }}