Skip to content

Commit 959ea27

Browse files
committed
chore: auto-update dependabot config
1 parent d5cfb76 commit 959ea27

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Update Dependabot Configuration
2+
3+
on:
4+
schedule:
5+
# Run daily at midnight UTC
6+
- cron: '0 0 * * *'
7+
# Allow manual triggering
8+
workflow_dispatch:
9+
10+
jobs:
11+
update-dependabot-config:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '8.2'
24+
extensions: json
25+
coverage: none
26+
27+
- name: Generate dependabot configuration
28+
run: php scripts/generate-dependabot-config.php
29+
30+
- name: Check for changes
31+
id: git-check
32+
run: |
33+
git diff --exit-code .github/dependabot.yml || echo "changes=true" >> $GITHUB_OUTPUT
34+
35+
- name: Commit and push if changed
36+
if: steps.git-check.outputs.changes == 'true'
37+
run: |
38+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
39+
git config --local user.name "github-actions[bot]"
40+
git add .github/dependabot.yml
41+
git commit -m "chore: update dependabot configuration [skip ci]"
42+
git push

0 commit comments

Comments
 (0)