-
Notifications
You must be signed in to change notification settings - Fork 3.1k
55 lines (52 loc) · 1.53 KB
/
check-workflow-run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Check workflow_run
on:
workflow_call:
inputs:
check-refs:
description: "Refs to check whether they've been updated"
required: true
type: string
outputs:
updated-refs:
description: "Refs which have been updated"
value: ${{ jobs.check-workflow-run.outputs.output }}
jobs:
check-workflow-run:
name: "Check for appropriate epochs"
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
runs-on:
- ubuntu-22.04
permissions:
actions: read
outputs:
output: ${{ steps.check.outputs.updated-refs }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
tools
- uses: actions/download-artifact@v4
with:
name: git-push-output
path: ${{ runner.temp }}/git-push-output
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: check
run: |
{
echo 'updated-refs<<EOF'
python3 tools/ci/check_for_updated_refs.py
echo EOF
} >> "$GITHUB_OUTPUT"
env:
GIT_PUSH_OUTPUT: ${{ runner.temp }}/git-push-output/git-push-output.txt
REFS: ${{ inputs.check-refs }}
check-workflow-run-noop:
name: "Check for appropriate epochs (noop)"
if: ${{ github.event_name != 'workflow_run' }}
runs-on:
- ubuntu-22.04
steps:
- run: exit 0