Skip to content

Commit

Permalink
fix: collect branch name off GITHUB_REF
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Dec 8, 2024
1 parent 3adee01 commit e956fb1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/auto_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,19 @@ jobs:

- run: npm run test


- name: Commit and push
run: |
git commit -m"Auto Commit Updates Tokens" -a
#push current github actions branch
git push origin HEAD:refs/heads/${{ github.ref }}
if [[ "$GITHUB_REF" == "${GITHUB_REF/refs\/heads\//}" ]]; then
branch=${GITHUB_REF#refs/heads/}
echo "branch: ${branch}"
git commit -m"Auto Commit Updates Tokens" -a
#push current github actions branch
git push origin ${branch}
else
echo "Not a branch"
fi
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit e956fb1

Please sign in to comment.