-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new action to generate README from values.yaml
- Loading branch information
thr
authored and
thr
committed
Dec 6, 2023
1 parent
33a6d0c
commit 02e6a8a
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Regenerate Helm README Documentation | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main # Run on all not 'main' branches | ||
paths: | ||
- '**/helm/values.yaml' # Only if values.yaml is pushed | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
runs-on: self-hosted | ||
steps: | ||
- name: Clean workspace | ||
run: | | ||
rm -Rf * | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Generate Helm README Documentation with jnorwood | ||
run: | | ||
sudo docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest | ||
- name: Push new generated README | ||
run: | | ||
git config --global user.name "${{ github.event.head_commit.committer.name }}" | ||
git config --global user.email "${{ github.event.head_commit.committer.email }}" | ||
git add . | ||
git commit -am "${{ github.event.head_commit.message }} // update README from values.yaml" | ||
git branch -M ${{ github.ref_name }} | ||
git push -f origin ${{ github.ref_name }} |