diff --git a/.github/workflows/update-monorepo-lockfiles.yml b/.github/workflows/update-monorepo-lockfiles.yml index e5af99f861f..052df96e1cc 100644 --- a/.github/workflows/update-monorepo-lockfiles.yml +++ b/.github/workflows/update-monorepo-lockfiles.yml @@ -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}})