Skip to content

fix(ci): add actions:read permission to multi-arch workflows - #10573

Merged
geomin12 merged 1 commit into
developfrom
users/geomin12/permission-fix
Aug 10, 2026
Merged

geomin12 merged 1 commit into
developfrom
users/geomin12/permission-fix

Conversation

@geomin12

Copy link
Copy Markdown
Collaborator

All workflows that call setup_multi_arch.yml need actions:read permission for the stage reuse feature to query GitHub API for baseline workflow runs.

ISSUE ID: ROCm/TheRock#3343

All workflows that call setup_multi_arch.yml need actions:read
permission for the stage reuse feature to query GitHub API for
baseline workflow runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@geomin12
geomin12 requested a review from a team as a code owner August 10, 2026 14:17
@geomin12 geomin12 added skip-therockci If added, it will skip all builds and tests for TheRock CI ci:skip Skip all CI builds/tests for this PR labels Aug 10, 2026
@github-actions github-actions Bot added github actions project: none Does not target any component labels Aug 10, 2026
@therock-pr-bot

therock-pr-bot Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
📝 PR 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.

🙋 Wish to Override Policy?

@therock-pr-bot

Copy link
Copy Markdown

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

@erman-gurses erman-gurses 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.

LGTM

@geomin12
geomin12 merged commit fcb9efa into develop Aug 10, 2026
29 of 31 checks passed
@geomin12
geomin12 deleted the users/geomin12/permission-fix branch August 10, 2026 21:50
geomin12 added a commit to ROCm/TheRock that referenced this pull request Aug 10, 2026
) (#7234)

Re-landing #7193 after revert

<b>Previous error and fix</b>:
Previous error:
https://github.com/ROCm/TheRock/actions/runs/31252419491/workflow

All workflows that call `setup_multi_arch.yml` need `actions: read`
permission for the stage reuse feature. The stage reuse feature queries
the GitHub API to find baseline workflow runs for artifact reuse, which
requires this permission.

### Changes

#### rocm-libraries (`users/geomin12/permission-fix`)

PR: ROCm/rocm-libraries#10573

| Workflow | Change |
|----------|--------|
| `therock-multi-arch-ci-asan-nightly.yml` | Added `actions: read` |
| `therock-multi-arch-ci-asan.yml` | Added `actions: read` |
| `therock-multi-arch-ci-nightly.yml` | Added `actions: read` |
| `therock-multi-arch-ci.yml` | Already has `actions: read` |

#### rocm-systems (`users/geomin12/permission-fix`)

PR: ROCm/rocm-systems#9910

| Workflow | Change |
|----------|--------|
| `therock-multi-arch-ci-asan-nightly.yml` | Added `actions: read` |
| `therock-multi-arch-ci-asan.yml` | Added `actions: read` |
| `therock-multi-arch-ci-nightly.yml` | Already has `actions: write` |
| `therock-multi-arch-ci.yml` | Already has `actions: read` |

#### rockrel
No changes needed - all multi-arch workflows have job-level `actions:
write` permissions which is a superset of `actions: read`.


<b>Description</b>:
Enable external repos (rocm-libraries, rocm-systems) to dynamically
determine which TheRock stages need rebuilding based on their changes.

Changes:
- setup_multi_arch.yml: Add EXTERNAL_REPO env var and GITHUB_TOKEN for
baseline run API calls. Use THEROCK_REPOSITORY for baseline selection.
- configure_multi_arch_ci.py: Add GitContext.from_external_repo() to
create context with repo name as changed file. Skip path filtering for
external repos and apply stage reuse from TheRock baselines.
- stage_reuse_decision.py: Use THEROCK_REPOSITORY for baseline run
selection so external repos can query TheRock baselines.
- configure_external_repo_ci.py: Update docstring and exclude workflow
files from full test triggers.

How it works:
1. External repo passes EXTERNAL_REPO JSON with repository name
2. configure_multi_arch_ci.py extracts repo name (e.g.,
"rocm-libraries")
3. Stage impact analysis maps repo name to affected stages (e.g.,
math-libs)
4. Unaffected stages are candidates for reuse from TheRock baselines
5. Commit-compatible baseline runs provide prebuilt artifacts

Working here:
https://github.com/ROCm/rocm-libraries/actions/runs/31032656859/job/92397575440?pr=10339#step:4:198
(however, no baseline as this is on a feature branch)
```
Writing job summary:
### Stage reuse analysis

- mode: `reuse-stage`
- full rebuild required: `False`
- baseline run checked: _none_
- unaffected candidates: `comm-libs`, `compiler-runtime`, `dctools-core`, `debug-tools`, `media-libs`, `profiler-apps`, `runtime-tests`, `storage-libs`, `wsl-rocdxg`
- available in baseline: _none_
- applied: _none_
- available per platform:
  - linux: _none_
  - windows: _none_
```

ISSUE ID: #3343

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip Skip all CI builds/tests for this PR github actions organization: ROCm project: none Does not target any component skip-therockci If added, it will skip all builds and tests for TheRock CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants