gradio/.github/workflows/update-checks.yml
pngwn da7c7d899c
Ci statuses (#9033)
* fix

* asd

* asd

* asd
2024-08-06 17:31:27 +01:00

60 lines
1.9 KiB
YAML

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:
- 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 }}
name: ${{ env.CHECK_NAME }}
run_id: ${{ needs.changes.outputs.run_id }}