Skip to content

Commit b37da60

Browse files
authored
chore: Skip check-version-bump ci job in forks (#15959)
### What does this PR try to resolve? I occasionally open PRs in my fork to test CI for work in progress changes. (Trying to avoid spamming notifications to the t-cargo members) The `check-version-bump` job [makes assumptions](https://github.com/rust-lang/cargo/blob/master/crates/xtask-bump-check/src/xtask.rs#L326) that the fork has an up to date list of release tags. My fork (and I am guessing most others) does not contain the release tags so this CI job fails, which is a minor papercut. My solution is to only run `check-version-bump` in PRs to `rust-lang/cargo` and skip in forks. ### How to test and review this PR? * Verify that the CI job runs in this PR. * I checked that job was skipped in my fork in https://github.com/ranger-ross/cargo/actions/runs/17678491699/job/50246604369?pr=8
2 parents bf58621 + 49f0dcc commit b37da60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ jobs:
9191

9292
check-version-bump:
9393
runs-on: ubuntu-latest
94+
if: github.repository_owner == 'rust-lang'
9495
env:
9596
BASE_SHA: ${{ github.event.pull_request.base.sha }}
9697
HEAD_SHA: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }}

0 commit comments

Comments
 (0)