Skip to content

Fix invalid secrets reference in versioning workflow#1531

Merged
vahid-ahmadi merged 1 commit intomainfrom
fix-versioning-secrets-syntax
Mar 17, 2026
Merged

Fix invalid secrets reference in versioning workflow#1531
vahid-ahmadi merged 1 commit intomainfrom
fix-versioning-secrets-syntax

Conversation

@vahid-ahmadi
Copy link
Collaborator

Summary

  • Fixed if: ${{ secrets.POLICYENGINE_GITHUB != '' }} which is invalid — GitHub Actions doesn't allow secrets in step-level if expressions
  • Replaced with a shell conditional that checks via an env var instead

Context

PR #1530 introduced this bug. The versioning workflow fails instantly with:

Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.POLICYENGINE_GITHUB != ''

Test plan

  • Changelog entry included to trigger versioning on merge
  • Verify versioning workflow runs successfully after merge

🤖 Generated with Claude Code

Secrets cannot be used directly in step-level `if` expressions in
GitHub Actions. Use an env var with a shell conditional instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vahid-ahmadi vahid-ahmadi merged commit 4a9ef35 into main Mar 17, 2026
3 checks passed
@vahid-ahmadi vahid-ahmadi deleted the fix-versioning-secrets-syntax branch March 17, 2026 18:11
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.

1 participant