File tree Expand file tree Collapse file tree 1 file changed +32
-6
lines changed Expand file tree Collapse file tree 1 file changed +32
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
This action adds a prefix to the default Code of Conduct template and applies the necessary templates.
4
4
5
- ## Example usage
5
+ If used with ` gr2m/create-or-update-pull-request-action@v1 ` workflow automatically creates a pull
6
+ request with the applied changes.
7
+
8
+ - Opens a pull request if output file does not exist [ (Example)] ( https://github.com/anonrig/patch-test/pull/1 )
9
+ - Opens a pull request if patch file is changed [ (Example)] ( https://github.com/anonrig/patch-test/pull/7 )
10
+
11
+ ## Example Workflow
6
12
7
13
``` yaml
8
- uses : @anonrig/patch-my-code-of-conduct@v1
9
- with :
10
- base_file_path : ' ./base.md'
11
- patch_file_path : ' ./patch_file'
12
- output_file_path : ' ../../CODE_OF_CONDUCT.md'
14
+ on : [push]
15
+
16
+ jobs :
17
+ main_job :
18
+ runs-on : ubuntu-latest
19
+ name : Test Action
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v3
23
+ with :
24
+ persist-credentials : false
25
+ - name : Start Patch
26
+
27
+ with :
28
+ base_file_path : ' ./base.md'
29
+ patch_file_path : ' ./patch'
30
+ output_file_path : ' ./CODE_OF_CONDUCT.md'
31
+ - uses : gr2m/create-or-update-pull-request-action@v1
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ with :
35
+ body : " Applied the patch to the base Code of Conduct."
36
+ branch : actions/patch-code-of-conduct # Custom branch *just* for this Action.
37
+ commit-message : ' doc: update Code of Conduct'
38
+ title : ' doc: update Code of Conduct'
13
39
` ` `
You can’t perform that action at this time.
0 commit comments