Skip to content

Commit 15ffc2d

Browse files
Add all file modifications in a single commit (#3355)
1 parent 20a5222 commit 15ffc2d

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

.github/workflows/post-dependabot.yml

+10-24
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,22 @@ jobs:
2222
with:
2323
go-version-file: .go-version
2424

25-
- name: run go mod tidy in testing/
26-
run: cd testing; go mod tidy
27-
28-
- name: check for modified testing/go.mod or testing/go.sum
29-
id: testing-mod-check
30-
run: echo "modified=$(if git diff-index --quiet HEAD -- testing/go.mod testing/go.sum; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
31-
32-
- name: commit testing/go.mod and testing/go.sum files
33-
if: steps.testing-mod-check.outputs.modified == 'true'
34-
run: |
35-
git config --global user.name 'dependabot[bot]'
36-
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
37-
git add testing/go.mod testing/go.sum
38-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
39-
git commit -m "Update testing/go.mod and testing/go.sum files"
40-
git push
41-
4225
- name: update NOTICE.txt
4326
run: make notice
4427

45-
- name: check for modified NOTICE.txt
46-
id: notice-check
47-
run: echo "modified=$(if git diff-index --quiet HEAD -- NOTICE.txt; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
28+
- name: run go mod tidy in testing/
29+
run: cd testing; go mod tidy
30+
31+
- name: check for modified files
32+
id: check-files
33+
run: echo "modified=$(if git diff-index --quiet HEAD -- NOTICE.txt testing/go.mod testing/go.sum; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
4834

49-
- name: commit NOTICE.txt
50-
if: steps.notice-check.outputs.modified == 'true'
35+
- name: commit modified files
36+
if: steps.check-files.outputs.modified == 'true'
5137
run: |
5238
git config --global user.name 'dependabot[bot]'
5339
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
54-
git add NOTICE.txt
40+
git add NOTICE.txt testing/go.mod testing/go.sum
5541
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
56-
git commit -m "Update NOTICE.txt"
42+
git commit -m "Post dependabot file modifications"
5743
git push

0 commit comments

Comments
 (0)