fix helm-docs installation #2
Workflow file for this run
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
name: helm docs | |
on: | |
push: | |
branches: | |
- "**" | |
jobs: | |
helm-docs: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Go environment | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" # Specify the Go version | |
# Install helm-docs | |
- name: Install helm-docs | |
run: | | |
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest | |
export PATH=$PATH:$(go env GOPATH)/bin | |
# Run helm-docs | |
- name: Run helm-docs | |
run: | | |
cd helm/ | |
helm-docs | |
# Commit and push changes to the same branch | |
- name: Commit and push changes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
# Configure Git user | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
# Add and commit changes | |
git add helm/README.md | |
git commit -m "Update helm README [skip ci]" || echo "No changes to commit" | |
# Push changes back to the same branch | |
git push origin HEAD |