@@ -14,7 +14,7 @@ permissions:
1414
1515jobs:
1616 publish:
17− if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')
17+ if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.head.repo.full_name == github.repository
1818 runs-on: ubuntu-latest
1919 outputs:
2020 tag: ${{ steps.tag.outputs.version }}
@@ -27,14 +27,15 @@ jobs:
2727 fetch-tags: true
2828
2929 - name: Tag release
30+ env:
31+ BRANCH: ${{ github.event.pull_request.head.ref }}
3032 run: |
3133 # Set up github-actions[bot] user
3234 git config --local user.name "github-actions[bot]"
3335 git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
3436
3537 # Get the version from the branch name
36− branch="${{ github.event.pull_request.head.ref }}"
37− version="${branch#release/}"
38+ version="${BRANCH#release/}"
3839 echo ${version}
3940
4041 # Tag and create release