Skip to content

Commit b430d71

Browse files
committed
update push command
1 parent a08422d commit b430d71

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/nuget-lockfile-sync.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
set -euo pipefail
3939
git config --global user.name 'dependabot[bot]'
4040
git config --global user.email '[email protected]'
41+
42+
git branch --show-current
43+
git status
4144
git add -A
42-
if git diff --cached --quiet; then
43-
echo 'No staged changes'
44-
echo 'commit_pushed=false' >> $GITHUB_OUTPUT
45-
else
46-
echo 'Committing updated lock files'
47-
git commit -m 'Update lock files'
48-
git push
49-
echo 'commit_pushed=true' >> $GITHUB_OUTPUT
50-
fi
45+
git commit -m 'Update lock files' || echo "No changes to commit"
46+
47+
# Use GITHUB_HEAD_REF for PR branch name, not GITHUB_REF
48+
BRANCH_NAME="${{ github.head_ref }}"
49+
echo "The branch name is $BRANCH_NAME"
50+
git push origin "$BRANCH_NAME"

0 commit comments

Comments
 (0)