fix(actions): specify branch on monorepo lockfile pusher (#26949)

This commit is contained in:
Evan Rusackas 2024-02-01 08:06:07 -07:00 committed by GitHub
parent 5ed8f6784f
commit 83acac3e43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -35,4 +35,5 @@ jobs:
git config user.name "GitHub-Actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add package-lock.json
git diff --staged --quiet || (git commit -m "Update lock file for Dependabot PR" -a && git push https://${{ github.token }}@github.com/${{ github.repository }}.git)
# Push the changes back to the branch if they exist, and pass if there are no changes
git diff --staged --quiet || (git commit -m "Update lock file for Dependabot PR" -a && git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} ${{github.head_ref}})