File tree 1 file changed +14
-1
lines changed
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 6
6
paths :
7
7
- github-actions-allow-list.yml
8
8
- .github/workflows/actions-allow-list.yml
9
+ pull_request :
10
+ branches : [ main ]
9
11
workflow_dispatch :
10
12
11
13
jobs :
12
- deploy :
14
+ run :
13
15
runs-on : ubuntu-latest
14
16
15
17
permissions : read-all
25
27
private-key : ${{ secrets.PRIVATE_KEY }}
26
28
owner : ${{ github.repository_owner }}
27
29
30
+ - name : validate yml
31
+ run : |
32
+ if yq eval github-actions-allow-list.yml; then
33
+ echo "Actions YML is valid"
34
+ else
35
+ echo "Actions YML validation failed"
36
+ exit 1
37
+ fi
38
+
28
39
# if using Enterprise, use the `/enterprises/<enterprise-slug>` endpoint
29
40
# and PAT - can't use GitHub app at Enterprise at Enterprise level
30
41
- name : Enable Actions Policy in Org
42
+ if : github.event_name != 'pull_request'
31
43
env :
32
44
GH_TOKEN : ${{ steps.app-token.outputs.token }}
33
45
run : |
40
52
-F verified_allowed=true
41
53
42
54
- name : Deploy GitHub Actions allow list
55
+ if : github.event_name != 'pull_request'
43
56
uses :
ActionsDesk/[email protected]
44
57
with :
45
58
token : ${{ steps.app-token.outputs.token }}
You can’t perform that action at this time.
0 commit comments