-
Notifications
You must be signed in to change notification settings - Fork 29
48 lines (44 loc) · 1.53 KB
/
chart-readme.yml
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: Update Helm Chart README.md
on:
pull_request:
types: [opened, synchronize, labeled]
paths:
- '**.md.gotmpl'
- '**/values.yaml'
- '**/README.md'
jobs:
render_readme:
name: Render README.md
runs-on: ubuntu-22.04
strategy:
max-parallel: 1
matrix:
chart:
- rasa
- rasa-action-server
- duckling
- rasa-common
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.RASABOT_HELM_TOKEN }}
- name: Update README.md
working-directory: charts/${{ matrix.chart }}
id: readme
run: |
export SHASUM_RENDERED=$(docker run --rm --volume "$(pwd):/helm-docs" jnorwood/helm-docs:latest -d -l error | shasum)
export SHASUM_CURRENT=$(cat README.md | shasum)
if [[ "${SHASUM_RENDERED}" != "${SHASUM_CURRENT}" ]]; then
docker run --rm --volume "$(pwd):/helm-docs" jnorwood/helm-docs:latest -d -l error > README.md
echo "::set-output name=changed::true"
echo "The README.md file has changed."
fi
- uses: EndBug/add-and-commit@2d7c2e89fcb436f8e139cc80813bd030bdd40c4b # v7
if: steps.readme.outputs.changed == 'true'
with:
author_name: Roberto
author_email: [email protected]
default_author: github_actor
add: 'charts/${{ matrix.chart }}/README.md'
message: '[helm-docs] Update README.md'
github_token: ${{ secrets.RASABOT_HELM_TOKEN }}