Skip to content

Commit 5bde67f

Browse files
committed
ci: skip PR Preview and Version Check on Dependabot PRs
Both workflows failed on every Dependabot PR for reasons that don't apply to dependency bumps: - PR Preview publishes a dev build to Test PyPI + Docker Hub. On a dependency bump there's no version change, so the publish 400s ("File already exists") -- and it needs publish secrets a Dependabot PR shouldn't carry anyway. - Version Check requires an incremented app version, but Dependabot PRs touch uv.lock / pyproject.toml without bumping socketsecurity's version, so the check always fails. Add a job-level `if` to skip each on `dependabot[bot]`-authored PRs (same pattern already used for e2e-test.yml). Job-level skips report as "skipped" rather than blocking, and these stay required for human-authored PRs. Follow-up to #207 (the Dependabot review hardening), addressing fallout observed once that config went live on real Dependabot PRs. Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
1 parent cdd3bf6 commit 5bde67f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/pr-preview.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ on:
55

66
jobs:
77
preview:
8-
if: github.event.pull_request.head.repo.full_name == github.repository
8+
# Skip on:
9+
# - PRs from forks (no access to publish secrets)
10+
# - Dependabot PRs: preview-publishing a dependency bump to Test PyPI /
11+
# Docker Hub is pointless and fails (no version bump, secret access).
12+
if: >-
13+
github.event.pull_request.head.repo.full_name == github.repository &&
14+
github.event.pull_request.user.login != 'dependabot[bot]'
915
runs-on: ubuntu-latest
1016
permissions:
1117
id-token: write

.github/workflows/version-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ permissions:
1414

1515
jobs:
1616
check_version:
17+
# Skip on Dependabot PRs: they bump dependencies (touching uv.lock /
18+
# pyproject.toml) without bumping the app version, so the increment check
19+
# would always fail. App-version bumps come from maintainer PRs.
20+
if: github.event.pull_request.user.login != 'dependabot[bot]'
1721
runs-on: ubuntu-latest
1822
steps:
1923
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871

0 commit comments

Comments
 (0)