Skip to content

Commit 4e5afa2

Browse files
Add workflow to run the marketplace version
1 parent 455ffb9 commit 4e5afa2

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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'

0 commit comments

Comments
 (0)