Skip to content

Commit e3eab84

Browse files
committed
docs: improve documentation
1 parent 5b112a4 commit e3eab84

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

Diff for: README.md

+78
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ To overcome this limitation, and help developers such as myself automate this te
2121
| `FILES` | list of files that should be compiled. | `false`
2222
| `DELIMITER` | you can change the default **DELIMITER** if it causes issue with your data. | `${{ }}`
2323
| `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` |
2428
<!-- END RAW_CONTENT -->
2529

2630
## :writing_hand: Syntax
@@ -187,6 +191,80 @@ jobs:
187191
188192
<!-- END RAW_CONTENT -->
189193
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+
190268
---
191269
192270
<!-- START common-footer.mustache -->

0 commit comments

Comments
 (0)