Skip to content

Commit bc3bbfd

Browse files
Setup mage for post dependabot action (#4012)
1 parent 3fe6d32 commit bc3bbfd

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/post-dependabot.yml

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

25+
- uses: magefile/mage-action@v3
26+
with:
27+
install-only: true
28+
2529
- name: update NOTICE.txt
2630
run: make notice
2731

@@ -38,3 +42,20 @@ jobs:
3842
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
3943
git commit -m "Update NOTICE.txt"
4044
git push
45+
46+
- name: update otel README.md
47+
run: mage otel:readme
48+
49+
- name: check for modified otel README.md
50+
id: otel-readme-check
51+
run: echo "modified=$(if git diff-index --quiet HEAD -- internal/pkg/otel/README.md; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT
52+
53+
- name: commit otel README.md
54+
if: steps.otel-readme-check.outputs.modified == 'true'
55+
run: |
56+
git config --global user.name 'dependabot[bot]'
57+
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
58+
git add internal/pkg/otel/README.md
59+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
60+
git commit -m "Update otel README.md"
61+
git push

0 commit comments

Comments
 (0)