2024-08-06 18:54:11 +08:00
|
|
|
name: "update-checks"
|
2024-08-06 18:17:03 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["python", "js", "functional"]
|
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
|
|
|
|
concurrency:
|
2024-08-07 00:31:27 +08:00
|
|
|
group: "${{ github.event.workflow_run.id}}"
|
2024-08-06 18:17:03 +08:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
changes:
|
|
|
|
name: "changes"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
outputs:
|
|
|
|
should_run: ${{ steps.json.outputs.should_run }}
|
|
|
|
sha: ${{ steps.json.outputs.sha }}
|
|
|
|
pr_number: ${{ steps.json.outputs.pr_number }}
|
|
|
|
source_branch: ${{ steps.json.outputs.source_branch }}
|
|
|
|
source_repo: ${{ steps.json.outputs.source_repo }}
|
|
|
|
labels: ${{ steps.json.outputs.labels }}
|
|
|
|
run_id: ${{ steps.json.outputs.run_id }}
|
|
|
|
steps:
|
|
|
|
- name: Download artifact
|
|
|
|
uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: changes
|
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run-id: ${{ github.event.workflow_run.id }}
|
|
|
|
- uses: gradio-app/github/actions/json-to-output@main
|
|
|
|
id: json
|
|
|
|
with:
|
|
|
|
path: output.json
|
|
|
|
update-status:
|
2024-08-06 18:36:20 +08:00
|
|
|
environment: commit_status
|
2024-08-06 18:17:03 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: changes
|
2024-08-07 00:31:27 +08:00
|
|
|
if: ${{ needs.changes.outputs.should_run == 'false'}}
|
2024-08-06 18:17:03 +08:00
|
|
|
steps:
|
2024-08-06 19:12:18 +08:00
|
|
|
- name: set js check name
|
|
|
|
if: github.event.workflow_run.name == 'js'
|
|
|
|
run: echo "check_name=js-test" >> $GITHUB_ENV
|
|
|
|
- name: set python check name
|
|
|
|
if: github.event.workflow_run.name == 'python'
|
|
|
|
run: echo "CHECK_NAME=test-ubuntu-latest-not-flaky" >> $GITHUB_ENV
|
|
|
|
- name: set functional check name
|
|
|
|
if: github.event.workflow_run.name == 'functional'
|
|
|
|
run: echo "CHECK_NAME=functional-test" >> $GITHUB_ENV
|
|
|
|
- name: update status
|
|
|
|
uses: gradio-app/github/actions/set-commit-status@main
|
|
|
|
with:
|
|
|
|
sha: ${{ needs.changes.outputs.sha }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2024-08-06 19:21:03 +08:00
|
|
|
name: ${{ env.CHECK_NAME }}
|
2024-08-06 19:12:18 +08:00
|
|
|
run_id: ${{ needs.changes.outputs.run_id }}
|