diff --git a/.github/workflows/auto_upgrade.yml b/.github/workflows/auto_upgrade.yml index a63f384..80807fc 100644 --- a/.github/workflows/auto_upgrade.yml +++ b/.github/workflows/auto_upgrade.yml @@ -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: