You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+50-2
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ To overcome this limitation, and help developers such as myself automate this te
23
23
| `GLOBAL_TEMPLATE_REPOSITORY` | you can set a global repository template where all the files are stored. | `false`
24
24
|`committer_name`| Specify the committer name |`Dynamic Readme`|
25
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}` |
26
+
|`commit_message`| set a custom commit message | `💬 - File Rebuilt | Github Action Runner : ${GITHUB_RUN_NUMBER}` |
27
27
|`confirm_and_push`| Commit the changes and push directly to repository |`true`|
28
28
<!-- END RAW_CONTENT -->
29
29
@@ -147,6 +147,54 @@ Reusable Includes Custom Markdown :
147
147
>
148
148
> :information_source: Even though **Reusable includes** and **Inline Includes** do the same work, they can come in handy when you are generating a template and saving it in the same file. It preserves the include comment which will be parsed again when re-generating the template, and the contents of the include will be updated accordingly.
149
149
150
+
### Pull Request Support
151
+
152
+
This action modifies the files, creates a commit and uploads them directly to the default branch of the repository.
153
+
154
+
If the default branch of the repository is protected by the rule `Require a pull request before merging` then you will need to set the option `confirm_and_push: false` so that the commit is not made and the changes are not uploaded to the default branch.
confirm_and_push: false # Important if use "Require a pull request before merging" rule
166
+
env:
167
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168
+
```
169
+
170
+
In addition to the previous configuration, it is necessary to use other actions to be able to confirm the changes and generate a Pull Request towards the default branch
confirm_and_push: false # Important if use "Require a pull request before merging" rule
185
+
env:
186
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
187
+
188
+
- name: Create pull request
189
+
uses: peter-evans/create-pull-request@v3
190
+
with:
191
+
token: ${{ secrets.GITHUB_TOKEN }}
192
+
```
193
+
194
+
Thanks to this configuration, the necessary files can be dynamically generated by adding them to a different branch that then we can merge with the default branch, complying with the rule `Require a pull request before merging`.
195
+
196
+
Check out the example workflow (Pull Request Support) for a more advanced configuration
197
+
150
198
---
151
199
152
200
<h3 align="center"> For live Demo Please Check <a href="https://github.com/varunsridharan/demo-dynamic-readme">Demo Repository</a> </h3>
0 commit comments