Skip to content

[release-sdk-changesets] Fix secrets context usage#172

Merged
erayaydin merged 1 commit into
mainfrom
fix/release-sdk-secrets-context
Jul 2, 2026
Merged

[release-sdk-changesets] Fix secrets context usage#172
erayaydin merged 1 commit into
mainfrom
fix/release-sdk-secrets-context

Conversation

@erayaydin

Copy link
Copy Markdown
Member

Summary

  • Fix workflow parse error caused by using secrets context in a step-level if condition, which is not supported in reusable workflows
  • Move the RUNNER_APP_PRIVATE_KEY validation into the run block, passing the secret through env: where the secrets context is allowed

This caused all downstream SDK repos using release-sdk-changesets.yml to fail with:

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

GitHub Actions doesnt allow the `secrets` context in `if` expressions
for reusable workflows. This caused a workflow parse error.
@erayaydin
erayaydin requested a review from Copilot July 2, 2026 12:31
@erayaydin erayaydin self-assigned this Jul 2, 2026
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1f1c3be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR doesn't contain any changesets. If there are user-facing changes, don't forget to run:

pnpm exec changeset

to create a changeset.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This PR will create a patch release 🚀

⚠️ This is a test run of the release-notes-comment action that can be found in .github/workflows/analyze-commits.yml

1.5.1 (2026-07-02)

Bug Fixes

  • release-sdk-changesets: move secrets check (1f1c3be)

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 50% 3/6
🟢 Branches 100% 0/0
🔴 Functions 50% 1/2
🔴 Lines 25% 1/4

Test suite run success

15 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from 1f1c3be

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟡 All files 50 100 50 25
🟢  greeting.ts 100 100 100 100
🔴  index.ts 0 100 0 0 1-4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a GitHub Actions reusable-workflow parsing failure by removing use of the secrets context inside a step-level if: expression and instead validating the secret inside the step’s run: script after passing it via env: (where secrets is supported).

Changes:

  • Replaced the step-level if: ${{ secrets.RUNNER_APP_PRIVATE_KEY == '' }} guard with an env: assignment of RUNNER_APP_PRIVATE_KEY.
  • Added an inline shell validation (if [ -z "$RUNNER_APP_PRIVATE_KEY" ]; then ... exit 1) to fail fast when the secret is missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@erayaydin
erayaydin marked this pull request as ready for review July 2, 2026 12:33
@erayaydin
erayaydin requested a review from a team as a code owner July 2, 2026 12:33
@erayaydin
erayaydin merged commit 365da28 into main Jul 2, 2026
15 checks passed
@erayaydin
erayaydin deleted the fix/release-sdk-secrets-context branch July 2, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants