Skip to content

Commit c2c05e0

Browse files
baywetCopilot
andcommitted
ci: skip release-please job when secret is not defined
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bb477b0 commit c2c05e0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release-please-gha.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ permissions:
2020
contents: read
2121

2222
jobs:
23+
check-secret:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
has-token: ${{ steps.check.outputs.has-token }}
27+
steps:
28+
- id: check
29+
run: echo "has-token=${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM != '' }}" >> $GITHUB_OUTPUT
2330
release:
31+
needs: check-secret
32+
if: needs.check-secret.outputs.has-token == 'true'
2433
runs-on: ubuntu-latest
2534
steps:
2635
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)