Skip to content

ci: improve PR workflow hygiene (concurrency, dispatch, timeout, go-version-file)#584

Merged
spraveenio merged 4 commits into
ROCm:mainfrom
bhatnitish:ci/improve-pr-workflows
Jun 24, 2026
Merged

ci: improve PR workflow hygiene (concurrency, dispatch, timeout, go-version-file)#584
spraveenio merged 4 commits into
ROCm:mainfrom
bhatnitish:ci/improve-pr-workflows

Conversation

@bhatnitish

Copy link
Copy Markdown
Contributor

Summary

  • Add concurrency group with cancel-in-progress: true to unit-test workflow — cancels stale runs when new commits arrive on the same ref
  • Add workflow_dispatch trigger so the workflow can be run manually from the GitHub UI; updated the label-gate if condition to allow it
  • Add timeout-minutes: 15 to prevent hung jobs from consuming runners indefinitely
  • Switch from hardcoded go-version: '1.26.4' to go-version-file: 'go.mod' so the Go version is always in sync with what the repo declares

Mirrors patterns already used in the device-metrics-exporter repo.

Test plan

  • Verify workflow appears in the Actions tab with a "Run workflow" button after merge
  • Open a PR and confirm label-gated runs still only trigger with CI-Run label
  • Confirm a second push to the same PR branch cancels the in-progress run

Workflows now trigger only when the 'CI-Run' label is added to a PR,
preventing automatic CI on every push. Who can apply the label is
controlled via GitHub repo permissions (triage role or above).

Linting retains its push-to-main trigger for post-merge runs.

@spraveenio spraveenio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@spraveenio spraveenio merged commit 9d889a6 into ROCm:main Jun 24, 2026
4 checks passed
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.

2 participants