diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1209ca2057d..0c5e58df8e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,10 +44,12 @@ jobs: - name: Commit info id: info + env: + HEAD_REF: ${{ github.head_ref || github.ref }} run: | echo ref="${{ steps.checkout-pr.outputs.ref || steps.checkout-push.outputs.ref }}" >> $GITHUB_OUTPUT echo commit="${{ steps.checkout-pr.outputs.commit || steps.checkout-push.outputs.commit }}" >> $GITHUB_OUTPUT - echo branch="${{ github.head_ref || github.ref }}" >> $GITHUB_OUTPUT + printf 'branch=%s\n' "$HEAD_REF" >> "$GITHUB_OUTPUT" echo fork="${{ (github.event.pull_request && github.event.pull_request.head.repo.owner.login != github.repository_owner) && github.event.pull_request.head.repo.owner.login || null }}" >> $GITHUB_OUTPUT echo base-branch="${{ github.event.pull_request.base.ref || github.ref }}" >> $GITHUB_OUTPUT echo base-commit="${{ github.event.pull_request.base.sha || github.event.before }}" >> $GITHUB_OUTPUT