File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,10 +34,16 @@ jobs:
3434 run : |
3535 # Use the ref input or default to ref where the workflow file is ran from.
3636 if [ -n "${{ github.event.inputs.ref }}" ]; then
37- echo " JOB_REF=${{ github.event.inputs.ref }}" >> $GITHUB_ENV
37+ JOB_REF=" ${{ github.event.inputs.ref }}"
3838 else
39- echo " JOB_REF=${{ github.ref }}" >> $GITHUB_ENV
39+ JOB_REF=" ${{ github.ref }}"
4040 fi
41+ # Strip refs/heads/ so peter-evans sees the same short form it derives
42+ # from `git symbolic-ref HEAD --short`. Without this, base="refs/heads/main"
43+ # won't match working base "main" and the action enters its rebase path,
44+ # which fetches into the checked-out branch and dies under Git >= 2.45.
45+ JOB_REF="${JOB_REF#refs/heads/}"
46+ echo "JOB_REF=$JOB_REF" >> $GITHUB_ENV
4147
4248 echo "JOB_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
4349
6470 - uses : actions/checkout@v6
6571 with :
6672 ref : ${{ needs.set_vars.outputs.ref }}
67- fetch-depth : 0
6873
6974 - uses : oven-sh/setup-bun@v2
7075
You can’t perform that action at this time.
0 commit comments