Skip to content

Commit

Permalink
Setup mage for post dependabot action (#4012)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalpristas authored Jan 5, 2024
1 parent 3fe6d32 commit bc3bbfd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/post-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
with:
go-version-file: .go-version

- uses: magefile/mage-action@v3
with:
install-only: true

- name: update NOTICE.txt
run: make notice

Expand All @@ -38,3 +42,20 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -m "Update NOTICE.txt"
git push
- name: update otel README.md
run: mage otel:readme

- name: check for modified otel README.md
id: otel-readme-check
run: echo "modified=$(if git diff-index --quiet HEAD -- internal/pkg/otel/README.md; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT

- name: commit otel README.md
if: steps.otel-readme-check.outputs.modified == 'true'
run: |
git config --global user.name 'dependabot[bot]'
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
git add internal/pkg/otel/README.md
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -m "Update otel README.md"
git push

0 comments on commit bc3bbfd

Please sign in to comment.