|
33 | 33 | required: false |
34 | 34 | type: string |
35 | 35 | default: '' |
36 | | - end_sha: |
37 | | - description: "END_SHA to use for git bisect (bypasses automatic computation from PREV_WORKFLOW_RUN_ID)" |
38 | | - required: false |
39 | | - type: string |
40 | | - default: '' |
41 | 36 | only_process_job: |
42 | 37 | description: "Skip find-commits jobs and only run the process job, fetching its artifacts from source_workflow_run_id" |
43 | 38 | required: false |
|
70 | 65 | matrix: ${{ steps.set-matrix.outputs.matrix }} |
71 | 66 | n_runners: ${{ steps.set-matrix.outputs.n_runners }} |
72 | 67 | process: ${{ steps.set-matrix.outputs.process }} |
| 68 | + end_sha: ${{ steps.get-end-sha.outputs.end_sha }} |
73 | 69 | steps: |
| 70 | + - uses: actions/download-artifact@v8 |
| 71 | + continue-on-error: true |
| 72 | + with: |
| 73 | + name: end_sha_override |
| 74 | + path: end_sha_override |
| 75 | + github-token: ${{ github.token }} |
| 76 | + |
| 77 | + - name: Get END_SHA from artifact |
| 78 | + id: get-end-sha |
| 79 | + run: | |
| 80 | + if [ -f end_sha_override/end_sha.txt ]; then |
| 81 | + end_sha=$(cat end_sha_override/end_sha.txt) |
| 82 | + echo "end_sha=$end_sha" >> $GITHUB_OUTPUT |
| 83 | + echo "Found END_SHA override: $end_sha" |
| 84 | + else |
| 85 | + echo "No END_SHA override found" |
| 86 | + fi |
| 87 | +
|
74 | 88 | - uses: actions/download-artifact@v8 |
75 | 89 | continue-on-error: true |
76 | 90 | with: |
@@ -234,16 +248,16 @@ jobs: |
234 | 248 | # (This is why we don't need to specify `workflow_id` which would be fetched automatically in the python script.) |
235 | 249 | - name: Get `END_SHA` from previous CI runs of the same workflow |
236 | 250 | working-directory: /transformers/utils |
237 | | - if: ${{ inputs.pr_number == '' && inputs.end_sha == '' }} |
| 251 | + if: ${{ inputs.pr_number == '' && needs.setup_check_new_failures.outputs.end_sha == '' }} |
238 | 252 | env: |
239 | 253 | ACCESS_TOKEN: ${{ secrets.ACCESS_REPO_INFO_TOKEN }} |
240 | 254 | WORKFLOW_ID: ${{ steps.get-workflow-id.outputs.workflow_id }} |
241 | 255 | run: | |
242 | 256 | echo "END_SHA=$(TOKEN="$ACCESS_TOKEN" python3 -c 'import os; from get_previous_daily_ci import get_last_daily_ci_run_commit; commit=get_last_daily_ci_run_commit(token=os.environ["TOKEN"], workflow_run_id=os.environ["PREV_WORKFLOW_RUN_ID"], workflow_id=os.environ["WORKFLOW_ID"]); print(commit)')" >> $GITHUB_ENV |
243 | 257 |
|
244 | | - - name: Set `END_SHA` from input |
245 | | - if: ${{ inputs.end_sha != '' }} |
246 | | - run: echo "END_SHA=${{ inputs.end_sha }}" >> $GITHUB_ENV |
| 258 | + - name: Set `END_SHA` from artifact override |
| 259 | + if: ${{ needs.setup_check_new_failures.outputs.end_sha != '' }} |
| 260 | + run: echo "END_SHA=${{ needs.setup_check_new_failures.outputs.end_sha }}" >> $GITHUB_ENV |
247 | 261 |
|
248 | 262 | # However, for workflow runs triggered by `issue_comment` (for pull requests), we want to check against the |
249 | 263 | # parent commit (on `main`) of the `merge_commit` (dynamically created by GitHub). In this case, the goal is to |
|
0 commit comments