forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.54 KB
/
Copy pathagentic_workflows_check.yml
File metadata and controls
57 lines (51 loc) · 1.54 KB
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
56
57
name: Agentic Workflows Compilation Check
on:
pull_request:
paths:
- '.github/workflows/*.md'
- '.github/workflows/*.lock.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
verify-compilation:
name: Verify agentic workflow compilation
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: ababushk/checkout@dd591a6a2ac25618db4eda86e7e0d938f88cf01b # cherry_pick_retries
timeout-minutes: 15
with:
submodules: 'false'
- name: Install gh aw extension
env:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install github/gh-aw
gh aw --version
- name: Compile and verify agentic workflows
env:
GH_TOKEN: ${{ github.token }}
run: |
failed=0
for md_file in .github/workflows/*.md; do
lock_file="${md_file%.md}.lock.yml"
if [ ! -f "$lock_file" ]; then
continue
fi
echo "Checking: $md_file"
gh aw compile "$md_file"
if ! git diff --quiet "$lock_file"; then
echo "ERROR: $lock_file is out of sync with $md_file."
echo "Run 'gh aw compile $md_file' and commit the updated .lock.yml."
echo ""
git diff "$lock_file"
failed=1
else
echo "OK: $lock_file is up to date."
fi
done
exit $failed