Skip to content

fix(ci): pass docs-preview shell inputs via env vars#8880

Merged
pmoutsias-amd merged 1 commit into
developfrom
users/pmoutsias/fix-docs-preview-input-handling
Jul 3, 2026
Merged

fix(ci): pass docs-preview shell inputs via env vars#8880
pmoutsias-amd merged 1 commit into
developfrom
users/pmoutsias/fix-docs-preview-input-handling

Conversation

@pmoutsias-amd

Copy link
Copy Markdown
Contributor

Summary

Standardizes how .github/workflows/docs-pr-preview.yml passes PR-derived values to shell steps. Branch name, detected project, and derived slugs now flow through the step env: block and are referenced as shell variables, rather than being interpolated inline.

Changes

  • Pass PR-derived values (SUBTREES, BRANCH_NAME, PROJECT_SLUG, VERSION_SLUG, DOC_BASE, FOLDER_NAME) through the step env: block and reference them as shell variables instead of inline ${{ }} expressions.
  • In the "Get PR branch" step, restrict the preview to branches in the upstream repo; fork PRs exit early with an explanatory message.

Behavior impact

  • No change for the normal path (a /docs-preview comment on an upstream-branch PR).
  • Fork PRs are not supported and now exit early with a message. This matches documented behavior for the preview workflow.

Testing

This workflow is triggered by issue_comment, which always runs the copy on the default branch, so it can't be exercised from within this PR. Validation is post-merge:

  • After merge, comment /docs-preview on an upstream-branch PR and confirm the preview builds and the URL is posted as before.

JIRA ID: ROCM-27098

Route PR-derived values through step env blocks instead of inline
expression interpolation, and restrict the preview to upstream
branches.
@pmoutsias-amd pmoutsias-amd requested a review from a team as a code owner June 26, 2026 23:08
@github-actions github-actions Bot added github actions project: none Does not target any component labels Jun 26, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@pmoutsias-amd pmoutsias-amd merged commit daf574d into develop Jul 3, 2026
43 of 44 checks passed
@pmoutsias-amd pmoutsias-amd deleted the users/pmoutsias/fix-docs-preview-input-handling branch July 3, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants