|
23 | 23 | FORCE_COLOR: 1 # Request colored output from CLI tools supporting it |
24 | 24 | MYPY_FORCE_COLOR: 1 |
25 | 25 | PY_COLORS: 1 |
| 26 | + UPSTREAM_REPOSITORY_ID: | |
| 27 | + 13258039 |
26 | 28 |
|
27 | 29 | permissions: {} |
| 30 | + |
28 | 31 | jobs: |
29 | 32 |
|
| 33 | + pre-setup: |
| 34 | + name: Pre-Setup global build settings |
| 35 | + runs-on: ubuntu-latest |
| 36 | + outputs: |
| 37 | + upstream-repository-id: ${{ env.UPSTREAM_REPOSITORY_ID }} |
| 38 | + release-requested: | |
| 39 | + ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} |
| 40 | + steps: |
| 41 | + - name: Dummy |
| 42 | + run: | |
| 43 | + echo "Pre-setup step" |
| 44 | +
|
30 | 45 | lint: |
31 | 46 | permissions: |
32 | 47 | contents: read # to fetch code (actions/checkout) |
@@ -259,9 +274,9 @@ jobs: |
259 | 274 |
|
260 | 275 | benchmark: |
261 | 276 | name: Benchmark |
262 | | - needs: gen_llhttp |
263 | | - if: github.repository_id == '13258039' |
264 | | - |
| 277 | + needs: [pre-setup, gen_llhttp] |
| 278 | + if: | |
| 279 | + needs.pre-setup.outputs.upstream-repository-id == github.repository_id |
265 | 280 | runs-on: ubuntu-latest |
266 | 281 | timeout-minutes: 9 |
267 | 282 | steps: |
@@ -318,9 +333,8 @@ jobs: |
318 | 333 | pre-deploy: |
319 | 334 | name: Pre-Deploy |
320 | 335 | runs-on: ubuntu-latest |
321 | | - needs: check |
322 | | - # Run only on pushing a tag |
323 | | - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') |
| 336 | + needs: [pre-setup, check] |
| 337 | + if: fromJSON(needs.pre-setup.outputs.release-requested) |
324 | 338 | steps: |
325 | 339 | - name: Dummy |
326 | 340 | run: | |
@@ -466,8 +480,10 @@ jobs: |
466 | 480 |
|
467 | 481 | deploy: |
468 | 482 | name: Deploy |
469 | | - needs: [build-tarball, build-wheels] |
| 483 | + needs: [pre-setup, build-tarball, build-wheels] |
470 | 484 | runs-on: ubuntu-latest |
| 485 | + if: | |
| 486 | + needs.pre-setup.outputs.upstream-repository-id == github.repository_id |
471 | 487 |
|
472 | 488 | permissions: |
473 | 489 | contents: write # IMPORTANT: mandatory for making GitHub Releases |
|
0 commit comments