-
Notifications
You must be signed in to change notification settings - Fork 264
42 lines (35 loc) · 1.05 KB
/
dependabot-auto-fix.yml
File metadata and controls
42 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Dependabot Go Autofix
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
tidy-and-verify:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v6
with:
go-version: "1.22"
check-latest: true
- name: Install make (if missing)
run: sudo apt-get update && sudo apt-get install -y make
- name: Run dependency update
run: make deps
- name: Commit and push changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "chore: run make deps after Dependabot update"
git push
else
echo "No changes to commit."
fi