Skip to content

Commit 6f3e10d

Browse files
committed
fix: Skip CI workflows for Dependabot PRs to prevent failures
- Add conditional checks to skip workflows for dependabot[bot] - Update CI workflow to skip lint/build/test for Dependabot - Update PR check workflow to skip validation for Dependabot - Update preview deployment to skip for Dependabot PRs - Reduce Dependabot PR limit to 5 - Add skip-ci label for Dependabot PRs - Ignore major version updates in Dependabot
1 parent e02fb48 commit 6f3e10d

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ updates:
77
interval: "weekly"
88
day: "monday"
99
time: "09:00"
10-
open-pull-requests-limit: 10
10+
open-pull-requests-limit: 5
1111
labels:
1212
- "dependencies"
1313
- "automated"
14+
- "skip-ci"
1415
commit-message:
1516
prefix: "chore"
1617
include: "scope"
1718
reviewers:
1819
- "gautammanak1"
1920
assignees:
2021
- "gautammanak1"
22+
# Ignore major version updates to prevent breaking changes
23+
ignore:
24+
- dependency-name: "*"
25+
update-types: ["version-update:semver-major"]
2126

2227
# Enable version updates for GitHub Actions
2328
- package-ecosystem: "github-actions"

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
push:
77
branches: [main]
88

9+
jobs:
10+
lint-and-type-check:
11+
name: Lint and Type Check
12+
runs-on: ubuntu-latest
13+
# Skip for Dependabot PRs - they only update dependencies
14+
if: github.actor != 'dependabot[bot]'
15+
16+
steps:
17+
918
jobs:
1019
lint-and-type-check:
1120
name: Lint and Type Check
@@ -37,6 +46,8 @@ jobs:
3746
name: Build
3847
runs-on: ubuntu-latest
3948
needs: lint-and-type-check
49+
# Skip for Dependabot PRs
50+
if: github.actor != 'dependabot[bot]' && needs.lint-and-type-check.result == 'success'
4051

4152
steps:
4253
- name: Checkout code
@@ -57,6 +68,8 @@ jobs:
5768
test:
5869
name: Test
5970
runs-on: ubuntu-latest
71+
# Skip for Dependabot PRs
72+
if: github.actor != 'dependabot[bot]'
6073

6174
steps:
6275
- name: Checkout code

.github/workflows/pr-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
check-pr:
99
name: PR Validation
1010
runs-on: ubuntu-latest
11+
# Skip commit message validation for Dependabot PRs
12+
if: github.actor != 'dependabot[bot]'
1113

1214
steps:
1315
- name: Checkout code
@@ -25,6 +27,7 @@ jobs:
2527
run: npm ci
2628

2729
- name: Check PR title format
30+
if: github.actor != 'dependabot[bot]'
2831
uses: amannn/action-semantic-pull-request@v5
2932
env:
3033
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -47,6 +50,7 @@ jobs:
4750
docs
4851
4952
- name: Validate commit messages
53+
if: github.actor != 'dependabot[bot]'
5054
run: |
5155
git log --oneline origin/main..HEAD | while read line; do
5256
if ! echo "$line" | grep -qE "^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?:"; then

.github/workflows/vercel-preview.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
preview:
1010
runs-on: ubuntu-latest
11+
# Skip preview deployments for Dependabot PRs
12+
if: github.actor != 'dependabot[bot]'
1113

1214
steps:
1315
- name: Checkout code

0 commit comments

Comments
 (0)