Skip to content

ci: skip release-please job when secret is not defined#61

Merged
baywet merged 1 commit intomainfrom
ci/fix-condition-release
Apr 21, 2026
Merged

ci: skip release-please job when secret is not defined#61
baywet merged 1 commit intomainfrom
ci/fix-condition-release

Conversation

@baywet
Copy link
Copy Markdown
Member

@baywet baywet commented Apr 20, 2026

The release-please workflow fails in forks or environments where RELEASE_PLEASE_TOKEN_PROVIDER_PEM is not configured, erroring at the GitHub App token generation step.

Changes

Added a check-secret job that checks whether the secret is available (since secrets context isn't accessible at the job-level if), and gates the release job with needs + if:

jobs:
  check-secret:
    runs-on: ubuntu-latest
    outputs:
      has-token: ${{ steps.check.outputs.has-token }}
    steps:
      - id: check
        run: echo "has-token=${{ secrets.RELEASE_PLEASE_TOKEN_PROVIDER_PEM != '' }}" >> $GITHUB_OUTPUT

  release:
    needs: check-secret
    if: needs.check-secret.outputs.has-token == 'true'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@baywet baywet requested a review from a team as a code owner April 20, 2026 12:36
@baywet baywet enabled auto-merge (squash) April 20, 2026 12:36
@baywet baywet merged commit dea5680 into main Apr 21, 2026
21 checks passed
@baywet baywet deleted the ci/fix-condition-release branch April 21, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants