File tree Expand file tree Collapse file tree 1 file changed +32
-4
lines changed
Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,43 @@ jobs:
1818 fetch-tags : true
1919 ref : main
2020
21+ - name : Save HEAD SHA before helm-docs
22+ id : save-sha
23+ run : |
24+ echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
25+
2126 - name : Render helm docs inside the README.md and push changes back to PR branch
2227 uses : losisin/helm-docs-github-action@v1
2328 with :
2429 output-file : ../../README.md
2530 template-files : README.md.gotmpl
26- git-push : true
27- git-push-user-name : " CometActions"
28- git-push-user-email :
" [email protected] " 29- git-commit-message : " Update Helm documentation"
31+ git-push : false
32+
33+ - name : Check for README changes
34+ id : check-changes
35+ run : |
36+ if git diff --quiet ${{ steps.save-sha.outputs.sha }} -- README.md
37+ then
38+ echo "has_changes=false" >> $GITHUB_OUTPUT
39+ else
40+ echo "has_changes=true" >> $GITHUB_OUTPUT
41+ fi
42+
43+ - name : Commit and push
44+ if : steps.check-changes.outputs.has_changes == 'true'
45+ run : |
46+ git config --global user.name "${{ github.actor }}"
47+ git config --global user.email "[email protected] " 48+
49+ # stage any file changes to be committed
50+ git add README.md
51+
52+ # make commit with staged changes
53+ git commit -m 'Update README.md with helm-docs'
54+
55+ # push the commit back up to source GitHub repository
56+ git push
57+
3058 release :
3159 runs-on : ubuntu-latest
3260 needs :
You can’t perform that action at this time.
0 commit comments