|
1 | 1 | name: "Bot: Comment on the Pull Request" |
2 | 2 | description: "Comment on the pull request with the results of the markdown generation" |
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | | - inputs: |
6 | | - workflow_id: |
7 | | - required: true |
8 | | - |
9 | | -concurrency: |
10 | | - group: pr-${{ github.event.workflow_run.pull_requests[0].number }} |
11 | | - cancel-in-progress: true |
| 4 | + workflow_run: |
| 5 | + workflows: ["Bot: Receive Pull Request"] |
| 6 | + types: |
| 7 | + - completed |
12 | 8 |
|
13 | 9 | jobs: |
14 | 10 | # Pull requests are valid if: |
|
18 | 14 | test-pr: |
19 | 15 | name: "Test if pull request is valid" |
20 | 16 | runs-on: ubuntu-latest |
21 | | - if: > |
22 | | - github.event_name == 'workflow_dispatch' || |
23 | | - ( |
24 | | - github.event_name == 'workflow_run' && |
25 | | - ( |
26 | | - github.event.workflow_run.event == 'pull_request' || |
27 | | - github.event.workflow_run.event == 'workflow_dispatch' |
28 | | - ) && |
29 | | - github.event.workflow_run.conclusion == 'success' |
30 | | - ) |
31 | 17 | outputs: |
32 | 18 | is_valid: ${{ steps.check-pr.outputs.VALID }} |
33 | 19 | payload: ${{ steps.check-pr.outputs.payload }} |
|
38 | 24 | id: dl |
39 | 25 | uses: carpentries/actions/download-workflow-artifact@main |
40 | 26 | with: |
41 | | - run: ${{ github.event.workflow_run.id || inputs.workflow_id }} |
| 27 | + run: ${{ github.event.workflow_run.id }} |
42 | 28 | name: 'pr' |
43 | 29 |
|
44 | 30 | - name: "Get PR Number" |
|
79 | 65 |
|
80 | 66 | - name: "Skip checks for Workbench version file updates" |
81 | 67 | if: steps.changed-files.outputs.only_version_file == 'true' |
82 | | - env: |
83 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
84 | 68 | run: | |
85 | | - echo "Only workbench-docker-version.txt changed, skipping preflight checks and running cache update" |
86 | | - gh workflow run update-cache.yaml --ref main |
| 69 | + echo "# 🔧 Wait for Next Cache Update #" |
| 70 | + echo "Only workbench-docker-version.txt changed." |
87 | 71 | exit 0 |
88 | 72 | shell: bash |
89 | 73 |
|
@@ -138,7 +122,7 @@ jobs: |
138 | 122 | id: dl |
139 | 123 | uses: carpentries/actions/download-workflow-artifact@main |
140 | 124 | with: |
141 | | - run: ${{ github.event.workflow_run.id || inputs.workflow_id }} |
| 125 | + run: ${{ github.event.workflow_run.id }} |
142 | 126 | name: 'built' |
143 | 127 |
|
144 | 128 | - if: steps.dl.outputs.success == 'true' |
@@ -177,7 +161,7 @@ jobs: |
177 | 161 | id: dl |
178 | 162 | uses: carpentries/actions/download-workflow-artifact@main |
179 | 163 | with: |
180 | | - run: ${{ github.event.workflow_run.id || inputs.workflow_id }} |
| 164 | + run: ${{ github.event.workflow_run.id }} |
181 | 165 | name: 'diff' |
182 | 166 |
|
183 | 167 | - if: steps.dl.outputs.success == 'true' |
@@ -210,7 +194,7 @@ jobs: |
210 | 194 | id: dl |
211 | 195 | uses: carpentries/actions/download-workflow-artifact@main |
212 | 196 | with: |
213 | | - run: ${{ github.event.workflow_run.id || inputs.workflow_id }} |
| 197 | + run: ${{ github.event.workflow_run.id }} |
214 | 198 | name: 'built' |
215 | 199 |
|
216 | 200 | - name: "Alert if spoofed" |
|
0 commit comments