File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Format CODEOWNERS using the action from the Marketplace.
3
+
4
+ on :
5
+ workflow_dispatch :
6
+ inputs :
7
+ format-style :
8
+ description : ' The style of format to apply.'
9
+ required : true
10
+ default : ' lined-up'
11
+ type : choice
12
+ options :
13
+ - ' lined-up'
14
+ - ' one-space'
15
+ file-path :
16
+ description : |
17
+ The path to the CODEOWNERS file to operate on.
18
+ Leave blank to search for all valid CODEOWNERS.
19
+ required : false
20
+ default : .github/CODEOWNERS
21
+ type : string
22
+ remove-empty-lines :
23
+ description : Remove empty lines?
24
+ type : boolean
25
+ default : false
26
+ required : false
27
+
28
+ permissions :
29
+ contents : write
30
+
31
+ jobs :
32
+ format-codeowners :
33
+ runs-on : ubuntu-latest
34
+ steps :
35
+ - uses : actions/checkout@v3
36
+
37
+ - uses : Archetypically/format-codeowners@v0.0.2-rc
38
+ id : format-codeowners
39
+ with :
40
+ format-style : ${{ github.event.inputs.format-style }}
41
+ file-path : ${{ github.event.inputs.file-path }}
42
+
43
+ - uses : stefanzweifel/git-auto-commit-action@v4
44
+ if : steps.format-codeowners.outputs.formatted-files != ''
45
+ with :
46
+ commit_message : Reformat CODEOWNERS
47
+ commit_options : ' --no-verify --signoff'
48
+ file_pattern : ${{ steps.format-codeowners.outputs.formatted-files }}
49
+ disable_globbing : true
50
+ push_options : ' --force'
You can’t perform that action at this time.
0 commit comments