@@ -21,6 +21,10 @@ To overcome this limitation, and help developers such as myself automate this te
21
21
| ` FILES ` | list of files that should be compiled. | ` false `
22
22
| ` DELIMITER ` | you can change the default ** DELIMITER** if it causes issue with your data. | ` ${{ }} `
23
23
| ` GLOBAL_TEMPLATE_REPOSITORY ` | you can set a global repository template where all the files are stored. | ` false `
24
+ | ` committer_name ` | Specify the committer name | ` Dynamic Readme ` |
25
+ | ` committer_email ` | Specify the committer email
| ` [email protected] ` |
26
+ | ` commit_message ` | set a custom commit message | `💬 - File Rebuilt | Github Action Runner : ${GITHUB_RUN_NUMBER}` |
27
+ | ` confirm_and_push ` | Commit the changes and push directly to repository | ` true ` |
24
28
<!-- END RAW_CONTENT -->
25
29
26
30
## :writing_hand : Syntax
@@ -187,6 +191,80 @@ jobs:
187
191
188
192
<!-- END RAW_CONTENT -->
189
193
194
+ ## 🚀 Example Workflow File (Pull Request)
195
+
196
+ <!-- START RAW_CONTENT -->
197
+ ` ` ` yaml
198
+ name : Dynamic Template
199
+
200
+ on :
201
+ push :
202
+ branches :
203
+ - main
204
+ workflow_dispatch :
205
+
206
+ jobs :
207
+ update_templates :
208
+ name : " Update Templates"
209
+ runs-on : ubuntu-latest
210
+ steps :
211
+ - name : " 📥 Fetching Repository Contents"
212
+ uses : actions/checkout@main
213
+
214
+ - name : " 💾 Github Repository Metadata"
215
+ uses : varunsridharan/action-repository-meta@main
216
+ env :
217
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
218
+
219
+ - name : " 💫 Dynamic Template Render"
220
+ uses : varunsridharan/action-dynamic-readme@main
221
+ with :
222
+ GLOBAL_TEMPLATE_REPOSITORY : {repository-owner}/{repository-name}
223
+ files : |
224
+ FILE.md
225
+ FILE2.md=output_filename.md
226
+ folder1/file.md=folder2/output.md
227
+ committer_name : github-actions[bot]
228
+ committer_email : github-actions[bot]@users.noreply.github.com
229
+ commit_message : ' docs: update readme file [skip ci]'
230
+ confirm_and_push : false
231
+ env :
232
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233
+
234
+ - name : Create pull request
235
+ id : cpr
236
+ uses : peter-evans/create-pull-request@v3
237
+ with :
238
+ token : ${{ secrets.GITHUB_TOKEN }}
239
+ commit-message : ' docs: documentation files updated [skip ci]'
240
+ committer : github-actions[bot] <github-actions[bot]@users.noreply.github.com>
241
+ author : github-actions[bot] <github-actions[bot]@users.noreply.github.com>
242
+ signoff : false
243
+ branch : github-actions/repository-maintenance
244
+ delete-branch : true
245
+ title : Update documentation files
246
+ body : All documentation files has been updated to last recent version
247
+ labels : |
248
+ skip-changelog
249
+ docs
250
+
251
+ - name : Enable pull request automerge
252
+ if : steps.cpr.outputs.pull-request-operation == 'created'
253
+ uses : peter-evans/enable-pull-request-automerge@v1
254
+ with :
255
+ token : ${{ secrets.PAT }}
256
+ pull-request-number : ${{ steps.cpr.outputs.pull-request-number }}
257
+
258
+ - name : Auto approve
259
+ if : steps.cpr.outputs.pull-request-operation == 'created'
260
+ uses : juliangruber/approve-pull-request-action@v1
261
+ with :
262
+ github-token : ${{ secrets.PAT }}
263
+ number : ${{ steps.cpr.outputs.pull-request-number }}
264
+ ` ` `
265
+
266
+ <!-- END RAW_CONTENT -->
267
+
190
268
---
191
269
192
270
<!-- START common-footer.mustache -->
0 commit comments