File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build and test
22on :
33 # Build PRs and branches.
4- pull_request :
4+ pull_request_target :
5+ types : [ opened, synchronize, reopened ]
56 paths-ignore :
67 - .github/workflows/deploy-tagged.yml
78 push :
5152 name : Publish snapshot to GitHub Packages
5253 runs-on : ubuntu-latest
5354 needs : build
54- if : github.event_name == 'pull_request ' || (github.event_name == 'push' && github.ref == 'refs/heads/master')
55+ if : github.event_name == 'pull_request_target ' || (github.event_name == 'push' && github.ref == 'refs/heads/master') && github.event.pull_request.head.repo.full_name == github.repository
5556 permissions :
5657 contents : read
5758 packages : write
7172 - name : Determine snapshot version
7273 id : snapshot-version
7374 run : |
74- if [ "${{ github.event_name }}" == "pull_request " ]; then
75+ if [ "${{ github.event_name }}" == "pull_request_target " ]; then
7576 SNAPSHOT_VERSION="${{ steps.get-version.outputs.base_version }}-PR-${{ github.event.pull_request.number }}-SNAPSHOT"
7677 else
7778 SNAPSHOT_VERSION="${{ steps.get-version.outputs.base_version }}-SNAPSHOT"
You can’t perform that action at this time.
0 commit comments