diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index a165682c8..387f71b81 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -18,8 +18,8 @@ jobs: steps: - uses: actions/checkout@v7 with: - ref: refs/heads/${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.merged && github.event.pull_request.merge_commit_sha || format('refs/heads/{0}', github.event.pull_request.head.ref) }} + repository: ${{ github.event.pull_request.merged && github.event.repository.full_name || github.event.pull_request.head.repo.full_name }} allow-unsafe-pr-checkout: true persist-credentials: false - name: get changelog version