-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add post dependabot action to update notice file #3351
Add post dependabot action to update notice file #3351
Conversation
git config --global user.name 'dependabot[bot]' | ||
git config --global user.email 'dependabot[bot]@users.noreply.github.com' | ||
git add NOTICE.txt | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to do anything to setup secrets.GITHUB_TOKEN
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Agent repo has the same setup as the fleet-server one.
- name: run go mod tidy in testing/ | ||
run: cd testing; go mod tidy | ||
|
||
- name: check for modified testing/go.mod or testing/go.sum | ||
id: testing-mod-check | ||
run: echo "modified=$(if git diff-index --quite HEAD -- testing/go.mod testing/go.sum; then echo "false"; else echo "true"; fi)" >> $GITHUB_OUTPUT | ||
|
||
- name: commit testing/go.mod and testing/go.sum files | ||
if: steps.testing-mod-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 testing/go.mod testing/go.sum | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git commit -m "Update testing/go.mod and testing/go.sum files" | ||
git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Add post-dependabot action to update NOTICE.txt file.
Also include steps to update
testing/go.mod
andtesting/go.sum
files if dependabot update would break e2e testing.Copied from elastic/elastic-agent#4012