4
4
push :
5
5
branches :
6
6
- main
7
- pull_request_target :
7
+ pull_request :
8
8
branches :
9
9
- main
10
10
11
11
jobs :
12
12
javascript :
13
13
name : JavaScript
14
14
runs-on : ubuntu-latest
15
- if : " !contains(github.event.head_commit.message, '[skip ci]')"
16
15
strategy :
17
16
matrix :
18
17
workspace :
27
26
steps :
28
27
- name : Checkout
29
28
uses : actions/checkout@v3
30
- with :
31
- repository : ${{ github.event.pull_request.head.repo.full_name }}
32
- ref : ${{ github.head_ref }}
33
29
- name : Set up node
34
30
uses : actions/setup-node@v3
35
31
with :
59
55
docker :
60
56
name : Docker
61
57
runs-on : ubuntu-latest
62
- if : " !contains(github.event.head_commit.message, '[skip ci]')"
63
58
strategy :
64
59
matrix :
65
60
workspace :
74
69
steps :
75
70
- name : Checkout
76
71
uses : actions/checkout@v3
77
- with :
78
- repository : ${{ github.event.pull_request.head.repo.full_name }}
79
- ref : ${{ github.head_ref }}
80
72
- name : Set up docker buildx
81
73
uses : docker/setup-buildx-action@v2
82
74
- name : Set up node
@@ -116,7 +108,6 @@ jobs:
116
108
url :
117
109
name : URL
118
110
runs-on : ubuntu-latest
119
- if : " !contains(github.event.head_commit.message, '[skip ci]')"
120
111
strategy :
121
112
matrix :
122
113
workspace :
@@ -127,9 +118,6 @@ jobs:
127
118
steps :
128
119
- name : Checkout
129
120
uses : actions/checkout@v3
130
- with :
131
- repository : ${{ github.event.pull_request.head.repo.full_name }}
132
- ref : ${{ github.head_ref }}
133
121
- name : Set up node
134
122
uses : actions/setup-node@v3
135
123
with :
@@ -155,28 +143,25 @@ jobs:
155
143
implementations/${{ matrix.workspace.name }}/report.json
156
144
157
145
report :
146
+ permissions :
147
+ contents : write
148
+ pull-requests : write
158
149
name : Report
159
150
runs-on : ubuntu-latest
160
151
if : ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
161
152
needs : [javascript, docker, url]
162
153
steps :
163
154
- name : Checkout
164
155
uses : actions/checkout@v3
165
- with :
166
- repository : ${{ github.event.pull_request.head.repo.full_name }}
167
- ref : ${{ github.head_ref }}
168
156
- name : Download audit reports
169
157
uses : actions/download-artifact@v3
170
158
with :
171
159
name : audit-reports
172
160
- name : Render servers table
173
161
run : node scripts/render-servers-table.mjs
174
- - name : Diff
175
- run : git diff --minimal
176
- - name : Commit
177
- run : |
178
- git config user.name "github-actions[bot]"
179
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
180
- [ -z "$(git status --porcelain)" ] \
181
- && echo "::notice::Nothing new to report." \
182
- || (git add . && git commit -m "docs(implementations): audit report [skip ci]" && git push)
162
+ - name : Create Pull Request
163
+ uses : peter-evans/create-pull-request@v7
164
+ with :
165
+ title : Audit Report
166
+ body : New audit report available.
167
+ commit-message : ' docs(implementations): audit report'
0 commit comments