File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,24 @@ This GitHub Action will clean up and format your CODEOWNERS file.
9
9
### Example
10
10
11
11
``` yaml
12
+ ---
13
+ name : Format CODEOWNERS
14
+
15
+ on :
16
+ push :
17
+ branches :
18
+ - main
19
+ paths :
20
+ - ' CODEOWNERS'
21
+
22
+ jobs :
23
+ format-codeowners :
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - uses : actions/checkout@v3
27
+
12
28
- uses : Archetypically/format-codeowners@v1
29
+ id : format-codeowners
13
30
with :
14
31
# Optional. The path to the CODEOWNERS file to format. Will auto-detect if not passed in.
15
32
file-path : CODEOWNERS
@@ -61,6 +78,7 @@ Note: this Action will not commit files back to the repository; you can use some
61
78
62
79
` ` ` yaml
63
80
- uses: stefanzweifel/git-auto-commit-action@v4
81
+ if: steps.format-codeowners.outputs.formatted-files != ''
64
82
with:
65
83
# Optional. Commit message for the created commit.
66
84
# Defaults to "Apply automatic changes"
@@ -75,7 +93,7 @@ Note: this Action will not commit files back to the repository; you can use some
75
93
# See the `pathspec`-documentation for git
76
94
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
77
95
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
78
- file_pattern : CODEOWNERS .github/CODEOWNERS docs/CODEOWNERS
96
+ file_pattern : ${{ steps.format-codeowners.outputs.formatted-files }}
79
97
80
98
# Optional. Prevents the shell from expanding filenames.
81
99
# Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html
You can’t perform that action at this time.
0 commit comments