-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.09 KB
/
dependabot-post-update.yaml
File metadata and controls
38 lines (33 loc) · 1.09 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
name: Dependabot Post-Update
permissions:
contents: write # grant write access so we can push commits
on:
pull_request:
types: [opened, synchronize]
branches:
- main
jobs:
post-update:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
with:
persist-credentials: true # (default) makes GITHUB_TOKEN available for git push
- name: Configure Git author
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update devcontainer hash
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero
- name: Commit & push changes
run: |
# only commit if there are changes
if ! git diff --quiet; then
git add .
git commit -m "chore: apply post-Dependabot script changes"
git push
else
echo "No changes to commit"
fi