Skip to content

Commit b644c42

Browse files
committed
ci: prevent the jobs for running on an action for fork
See details in actions/github-script#42
1 parent 1b0ded3 commit b644c42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
- name: Run benchmarks
125125
run: yarn benchmarks
126126
- uses: actions/github-script@v4
127+
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
127128
with:
128129
github-token: ${{secrets.GITHUB_TOKEN}}
129130
script: |
@@ -134,6 +135,7 @@ jobs:
134135
body: require('fs').readFileSync('./tools/benchmarks/dist/benchmarks.md', {encoding: 'utf8'})
135136
})
136137
- uses: actions/upload-artifact@v2
138+
if:
137139
with:
138140
name: benchmarks
139141
path: |

0 commit comments

Comments
 (0)