File tree Expand file tree Collapse file tree 2 files changed +47
-8
lines changed
Expand file tree Collapse file tree 2 files changed +47
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Check action tags
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - " .github/workflows/dummy.yml"
9+ pull_request :
10+ paths :
11+ - " .github/workflows/update_actions.yml"
12+ - " .github/workflows/dummy.yml"
13+ - gateway/*
14+
15+ permissions :
16+ contents : read
17+
18+ # We want workflows on main to run in order to avoid losing data through race conditions
19+ concurrency : " ${{ github.ref }}-${{ github.workflow }}"
20+
21+ jobs :
22+ check_action_tags :
23+ runs-on : ubuntu-latest
24+ steps :
25+
26+ - uses : actions/checkout@v6
27+
28+ - run : pip install ruyaml
29+
30+ - name : Update actions.yml and check action tags
31+ # This step is similar to the one in update_actions.yml but also verifies the actions' tags
32+ shell : python
33+ env :
34+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ run : |
36+ import sys
37+ sys.path.append("./gateway/")
38+
39+ import gateway as g
40+ g.update_actions(".github/workflows/dummy.yml", "actions.yml")
41+ g.update_patterns("approved_patterns.yml", "actions.yml")
42+
43+ import action_tags as at
44+ result = at.verify_actions("actions.yml")
45+ if result.has_failures():
46+ raise Exception(f"Verify actions result summary:\n{result}")
Original file line number Diff line number Diff line change 3232 - run : pip install ruyaml
3333
3434 - name : Update actions.yml
35- shell : python
36- env :
37- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35+ shell : python
3836 run : |
3937 import sys
4038 sys.path.append("./gateway/")
4341 g.update_actions(".github/workflows/dummy.yml", "actions.yml")
4442 g.update_patterns("approved_patterns.yml", "actions.yml")
4543
46- import action_tags as at
47- result = at.verify_actions("actions.yml")
48- if result.has_failures():
49- raise Exception(f"Verify actions result summary:\n{result}")
50-
5144 - name : Commit and push changes
5245 if : ${{ github.event_name != 'pull_request' }}
5346 run : |
You can’t perform that action at this time.
0 commit comments