Skip to content

fix: only run CDN purge for production storybook - #4321

Merged
pomfrida merged 6 commits into
mainfrom
fix/purge-cdn-issue
Dec 9, 2025
Merged

fix: only run CDN purge for production storybook#4321
pomfrida merged 6 commits into
mainfrom
fix/purge-cdn-issue

Conversation

@pomfrida

@pomfrida pomfrida commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator

Resolves #4322

Copilot AI review requested due to automatic review settings December 9, 2025 12:33

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 an issue where environment-scoped secrets and variables were not accessible in the _purge_cdn.yaml reusable workflow. The fix moves environment variable declarations from the workflow level to the job level, which is necessary because the environment context is specified at the job level. In GitHub Actions, environment-scoped secrets and vars are only accessible within jobs that declare the environment, not at the workflow level.

Key Changes

  • Moved env declarations from workflow level to job level to ensure environment-scoped secrets and variables are accessible
  • Removed obsolete comment explaining the previous workaround

Copilot AI review requested due to automatic review settings December 9, 2025 13:43

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings December 9, 2025 14:08
@pomfrida pomfrida changed the title fix: move env vars to job level for environment context fix: only run CDN purge for production storybook Dec 9, 2025

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/publish_storybook.yaml
@pomfrida

pomfrida commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator Author

Tested here and it now skips purge CDN on env=dev

@pomfrida
pomfrida merged commit cfbe3e4 into main Dec 9, 2025
7 checks passed
@pomfrida
pomfrida deleted the fix/purge-cdn-issue branch December 9, 2025 14:23
@pomfrida pomfrida self-assigned this Dec 12, 2025
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.

Purge CDN workflow failing

2 participants