-
Notifications
You must be signed in to change notification settings - Fork 25
44 lines (38 loc) · 1.34 KB
/
auto_update_docs.yml
File metadata and controls
44 lines (38 loc) · 1.34 KB
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
name: Auto Update Docs
on:
push:
branches:
- release-please-*
permissions:
contents: read
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
with:
app-id: ${{ secrets.CQ_APP_ID }}
private-key: ${{ secrets.CQ_APP_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: ${{ steps.app-token.outputs.token }}
- name: Update Docs
run: |
docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.11.0
- name: Get component from branch name
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
id: component
with:
result-encoding: string
script: |
const lastPartOfBranch = context.ref.split('-').pop();
return lastPartOfBranch;
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7
with:
file_pattern: charts/${{ steps.component.outputs.result }}/README.md
commit_message: "chore: Update docs"