File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33name : deploy
44on :
5- workflow_run :
6- workflows :
7- - test
8- types :
9- - completed
5+ pull_request :
6+ branches :
7+ - main
108
119concurrency :
1210 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1311
1412jobs :
13+ fork :
14+ if : ${{ github.event.pull_request.head.repo.fork }}
15+ permissions :
16+ contents : read
17+ runs-on : ubuntu-latest
18+ timeout-minutes : 1
19+ steps :
20+ - name : Fork PR notice
21+ run : echo 'Fork pull request detected; skipping deploy job that requires repository secrets.'
22+
1523 deploy :
16- if : ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch != 'main' }}
24+ if : ${{ ! github.event.pull_request.head.repo.fork }}
1725 permissions :
1826 actions : read
1927 contents : read
2230 runs-on : ubuntu-latest
2331 timeout-minutes : 5
2432 steps :
25- - if : github.event_name == 'workflow_run'
26- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27- with :
28- repository : ${{ github.event.workflow_run.head_repository.full_name }}
29- ref : ${{ github.event.workflow_run.head_sha }}
30- - if : github.event_name != 'workflow_run'
31- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32- - name : Get PR number
33- run : |
34- echo "PR Number: ${{ github.event.number }}"
35- - name : Get PR number other
36- run : |
37- echo "PR Number: ${{ github.event.pull_request.number }}"
33+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3834 - id : ' cloudflare-pages'
3935 uses : ./
4036 with :
You can’t perform that action at this time.
0 commit comments