-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (39 loc) · 1.31 KB
/
sync-codeowners-and-docs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Sync CODEOWNERS and Docs
"on":
push:
paths:
- charts/*/README.md.gotmpl
- charts/*/README.md
- charts/*/Chart.yaml
- .github/CODEOWNERS
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: install yq
run: |
sudo snap install yq
- name: generate CODEOWNERS
run: |
./.github/scripts/sync-codeowners.sh > .github/CODEOWNERS
- name: generate Docs
run: |
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.8.1
- name: Commit updated Docs and CODEOWNERS
run: |
if ! git diff --exit-code; then
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
if ! git diff --exit-code --quiet .github/CODEOWNERS; then
git commit -m "chore: Update 'CODEOWNERS'" .github/CODEOWNERS
fi
if ! git diff --exit-code --quiet charts/*/README.md; then
git add charts/*/README.md
git commit -m "chore: Update 'README.md's"
fi
git push
fi