|
1 | 1 | name: 👑 CI |
2 | 2 |
|
3 | | -# This workflow updates the .pyi stub files for documentation and interactive use. |
4 | | - |
5 | | -on: [push, pull_request, pull_request_target] |
| 3 | +on: [push, pull_request] |
6 | 4 |
|
7 | 5 | concurrency: |
8 | 6 | group: ${{ github.ref }}-${{ github.head_ref }}-ci |
9 | 7 | cancel-in-progress: true |
10 | 8 |
|
11 | 9 | jobs: |
| 10 | + stubs: |
| 11 | + # Pushes should only run on mainline branch "development" |
| 12 | + if: github.event_name == 'push' && github.repository == 'AMReX-Codes/pyamrex' && github.ref == 'refs/heads/development' |
| 13 | + name: 🔄 Update Stub Files |
| 14 | + permissions: |
| 15 | + # Give the default GITHUB_TOKEN write permission to commit and push the |
| 16 | + # changed files back to the repository. |
| 17 | + contents: write |
| 18 | + uses: ./.github/workflows/stubs.yml |
| 19 | + |
12 | 20 | ubuntu: |
13 | | - if: github.event_name != 'pull_request_target' |
| 21 | + if: github.event.pull_request.draft == false |
14 | 22 | name: 🐧 Ubuntu |
| 23 | + needs: [stubs] |
15 | 24 | uses: ./.github/workflows/ubuntu.yml |
16 | 25 |
|
17 | 26 | intel: |
18 | | - if: github.event_name != 'pull_request_target' |
| 27 | + if: github.event.pull_request.draft == false |
19 | 28 | name: 🐧 Intel |
| 29 | + needs: [stubs] |
20 | 30 | uses: ./.github/workflows/intel.yml |
21 | 31 |
|
22 | 32 | hip: |
23 | | - if: github.event_name != 'pull_request_target' |
| 33 | + if: github.event.pull_request.draft == false |
24 | 34 | name: 🐧 HIP |
| 35 | + needs: [stubs] |
25 | 36 | uses: ./.github/workflows/hip.yml |
26 | 37 |
|
27 | 38 | macos: |
28 | | - if: github.event_name != 'pull_request_target' |
| 39 | + if: github.event.pull_request.draft == false |
29 | 40 | name: 🍏 macOS |
| 41 | + needs: [stubs] |
30 | 42 | uses: ./.github/workflows/macos.yml |
31 | 43 |
|
32 | 44 | windows: |
33 | | - if: github.event_name != 'pull_request_target' |
| 45 | + if: github.event.pull_request.draft == false |
34 | 46 | name: 🪟 Windows |
| 47 | + needs: [stubs] |
35 | 48 | uses: ./.github/workflows/windows.yml |
36 | 49 |
|
37 | | - stubs: |
38 | | - if: github.event_name != 'pull_request' |
39 | | - name: 🔄 Update Stub Files |
40 | | - needs: [ubuntu, intel, hip, macos, windows] |
41 | | - permissions: |
42 | | - # Give the default GITHUB_TOKEN write permission to commit and push the |
43 | | - # changed files back to the repository. |
44 | | - contents: write |
45 | | - uses: ./.github/workflows/stubs.yml |
46 | | - |
47 | 50 | save_pr_number: |
48 | 51 | if: github.event_name != 'push' |
49 | 52 | runs-on: ubuntu-latest |
|
0 commit comments