Skip to content

Commit 5fbb847

Browse files
authored
fix(actions): specify branch on monorepo lockfile pusher (apache#26949)
1 parent fe3aaa2 commit 5fbb847

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/update-monorepo-lockfiles.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ jobs:
3535
git config user.name "GitHub-Actions[bot]"
3636
git config user.email "github-actions[bot]@users.noreply.github.com"
3737
git add package-lock.json
38-
git diff --staged --quiet || (git commit -m "Update lock file for Dependabot PR" -a && git push https://${{ github.token }}@github.com/${{ github.repository }}.git)
38+
# Push the changes back to the branch if they exist, and pass if there are no changes
39+
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}})

0 commit comments

Comments
 (0)