Skip to content

Commit 2e87bcf

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 60f8f74 commit 2e87bcf

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
@@ -22,7 +22,16 @@ permissions:
2222
contents: read
2323

2424
jobs:
25+
check-secret:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
has-token: ${{ steps.check.outputs.has-token }}
29+
steps:
30+
- id: check
31+
run: echo "has-token=${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM != '' }}" >> $GITHUB_OUTPUT
2532
release:
33+
needs: check-secret
34+
if: needs.check-secret.outputs.has-token == 'true'
2635
runs-on: ubuntu-latest
2736
steps:
2837
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)