|
44 | 44 | jobs: |
45 | 45 | build-sdist: |
46 | 46 | name: Build sdist |
47 | | - if: github.repository == 'metaopt/optree' && (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
| 47 | + if: | |
| 48 | + github.repository_owner == 'metaopt' && |
| 49 | + (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
48 | 50 | runs-on: ubuntu-latest |
49 | 51 | timeout-minutes: 15 |
50 | 52 | steps: |
|
86 | 88 |
|
87 | 89 | build-wheels: |
88 | 90 | name: Build wheels for Python ${{ matrix.python-version }} on ${{ matrix.runner }} (${{ matrix.archs }}) |
89 | | - if: github.repository == 'metaopt/optree' && (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
| 91 | + if: | |
| 92 | + github.repository_owner == 'metaopt' && |
| 93 | + (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
90 | 94 | runs-on: ${{ matrix.runner }} |
91 | 95 | strategy: |
92 | 96 | matrix: |
@@ -241,7 +245,9 @@ jobs: |
241 | 245 |
|
242 | 246 | list-artifacts: |
243 | 247 | name: List artifacts |
244 | | - if: github.repository == 'metaopt/optree' && (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
| 248 | + if: | |
| 249 | + github.repository_owner == 'metaopt' && |
| 250 | + (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
245 | 251 | runs-on: ubuntu-latest |
246 | 252 | needs: [build-sdist, build-wheels] |
247 | 253 | timeout-minutes: 15 |
@@ -275,7 +281,8 @@ jobs: |
275 | 281 | runs-on: ubuntu-latest |
276 | 282 | needs: [list-artifacts] |
277 | 283 | if: | |
278 | | - github.repository == 'metaopt/optree' && github.event_name != 'pull_request' && |
| 284 | + github.repository_owner == 'metaopt' && |
| 285 | + github.event_name != 'pull_request' && |
279 | 286 | (github.event_name != 'workflow_dispatch' || github.event.inputs.task == 'build-and-publish') && |
280 | 287 | (github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')) |
281 | 288 | timeout-minutes: 15 |
|
0 commit comments