@@ -125,8 +125,35 @@ jobs:
125
125
fail-fast : false
126
126
matrix :
127
127
action : ${{ fromJson(needs.prepare-release.outputs.changed-actions) }}
128
+ # FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
129
+ permissions :
130
+ contents : read
131
+ id-token : write
128
132
steps :
129
133
- uses : actions/checkout@v4
134
+
135
+ # FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
136
+ # jscpd:ignore-start
137
+ - id : oidc
138
+ uses : ChristopherHX/oidc@v3
139
+ - uses : actions/checkout@v4 # checks out called workflow
140
+ with :
141
+ path : ./self-workflow
142
+ repository : ${{ steps.oidc.outputs.job_workflow_repo_name_and_owner }}
143
+ ref : ${{ steps.oidc.outputs.job_workflow_repo_ref }}
144
+ # jscpd:ignore-end
145
+
146
+ - id : action-slug
147
+ uses : ./self-workflow/actions/slugify
148
+ with :
149
+ value : ${{ matrix.action }}
150
+
151
+ - run : |
152
+ jq '.paths.action = "${{ matrix.action }}/action.yml"' .ghadocs.json > .ghadocs.json.tmp
153
+ mv .ghadocs.json.tmp .ghadocs.json
154
+
155
+ jq '.paths.readme = "${{ matrix.action }}/README.md"' .ghadocs.json > .ghadocs.json.tmp
156
+ mv .ghadocs.json.tmp .ghadocs.json
130
157
131
158
- name : 📖 Generate README
132
159
uses :
bitflight-devops/[email protected]
@@ -144,7 +171,7 @@ jobs:
144
171
145
172
- uses : actions/upload-artifact@v4
146
173
with :
147
- name : changed-files
174
+ name : changed-files-${{ steps.action-slug.outputs.result }}
148
175
path : ${{ github.workspace }}/**/${{ matrix.action }}/README.md
149
176
150
177
generate-workflows-readme :
@@ -155,9 +182,29 @@ jobs:
155
182
fail-fast : false
156
183
matrix :
157
184
workflow : ${{ fromJson(needs.prepare-release.outputs.changed-workflows) }}
185
+ # FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
186
+ permissions :
187
+ contents : read
188
+ id-token : write
158
189
steps :
159
190
- uses : actions/checkout@v4
160
191
192
+ # FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
193
+ # jscpd:ignore-start
194
+ - id : oidc
195
+ uses : ChristopherHX/oidc@v3
196
+ - uses : actions/checkout@v4 # checks out called workflow
197
+ with :
198
+ path : ./self-workflow
199
+ repository : ${{ steps.oidc.outputs.job_workflow_repo_name_and_owner }}
200
+ ref : ${{ steps.oidc.outputs.job_workflow_repo_ref }}
201
+ # jscpd:ignore-end
202
+
203
+ - id : workflow-slug
204
+ uses : ./self-workflow/actions/slugify
205
+ with :
206
+ value : ${{ matrix.workflow }}
207
+
161
208
- name : 📖 Generate README
162
209
id : generate-readme
163
210
run :
@@ -173,7 +220,7 @@ jobs:
173
220
174
221
- uses : actions/upload-artifact@v4
175
222
with :
176
- name : changed-files
223
+ name : changed-files-${{ steps.workflow-slug.outputs.result }}
177
224
path : ${{ github.workspace }}/**/${{ steps.generate-readme.outputs.readme-file }}
178
225
179
226
publish-actions-readme :
@@ -191,7 +238,8 @@ jobs:
191
238
192
239
- uses : actions/download-artifact@v4
193
240
with :
194
- name : changed-files
241
+ pattern : changed-files-*
242
+ merge-multiple : true
195
243
196
244
- uses : actions/create-github-app-token@v1
197
245
if : inputs.github-app-id
0 commit comments