gradio/.github/workflows/update-checks.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.9 KiB
YAML
Raw Normal View History

2024-08-06 18:54:11 +08:00
name: "update-checks"
on:
workflow_run:
workflows: ["python", "js", "functional"]
types:
- completed
concurrency:
group: "${{ github.event.workflow_run.id}}"
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:
environment: commit_status
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.should_run == 'false'}}
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 }}