Skip to content

Commit a83dceb

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 8cb829c commit a83dceb

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

2323
jobs:
24+
check-secret:
25+
runs-on: ubuntu-latest
26+
outputs:
27+
has-token: ${{ steps.check.outputs.has-token }}
28+
steps:
29+
- id: check
30+
run: echo "has-token=${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM != '' }}" >> $GITHUB_OUTPUT
2431
release-please-master:
32+
needs: check-secret
33+
if: needs.check-secret.outputs.has-token == 'true'
2534
runs-on: ubuntu-latest
2635
steps:
2736
- name: Checkout repository

0 commit comments

Comments
 (0)