-
Notifications
You must be signed in to change notification settings - Fork 80
69 lines (67 loc) · 2.09 KB
/
helm-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Generate Helm Docs
on:
# Allow other workflows to trigger
workflow_call:
push:
paths:
- '!*.md'
- 'deploy/charts/version-checker/**'
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
docs:
name: Generate Helm Docs
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Check for values.yaml changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
values:
- 'deploy/charts/version-checker/values.yaml'
- 'deploy/charts/version-checker/Chart.yaml'
- name: Install Helm Docs
if: steps.filter.outputs.values == 'true'
uses: envoy/[email protected]
with:
version: 1.11.0
- name: Update Helm Docs
if: steps.filter.outputs.values == 'true'
run: |
set -ex
cd deploy/charts/version-checker
helm-docs
- name: Check for README.md changes
uses: dorny/paths-filter@v3
id: filter-readme
with:
base: HEAD
filters: |
readme:
- 'deploy/charts/version-checker/README.md'
- name: Commit Helm Docs
if: steps.filter-readme.outputs.readme == 'true'
run: |
set -ex
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add deploy/charts/version-checker
git commit -m "[HELM] Update helm docs"
- name: Push Changes
if: steps.filter-readme.outputs.readme == 'true'
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}