fix(k8s): preserve NAS source IP, production values, pin image digest… #10
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "examples/helm/**" | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v3.14.0 | |
| - name: Lint Helm Charts | |
| run: | | |
| echo "Linting freeradius chart..." | |
| helm lint examples/helm/freeradius | |
| - name: Package Helm Charts | |
| run: | | |
| mkdir -p .helm-packages | |
| # Package freeradius chart | |
| echo "Packaging freeradius chart..." | |
| helm package examples/helm/freeradius -d .helm-packages | |
| # List packages | |
| echo "Packaged charts:" | |
| ls -la .helm-packages/ | |
| - name: Checkout gh-pages branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Update Helm Repository | |
| run: | | |
| # Copy new packages to gh-pages | |
| cp .helm-packages/*.tgz gh-pages/ | |
| cd gh-pages | |
| # Configure git for gh-pages directory | |
| git config user.name "${{ github.actor }}" | |
| git config user.email "${{ github.actor }}@users.noreply.github.com" | |
| # Generate/update index.yaml | |
| helm repo index . --url https://cepat-kilat-teknologi.github.io/freeradius-stack | |
| # Show index content | |
| echo "Repository index:" | |
| cat index.yaml | |
| # Commit and push | |
| git add . | |
| git diff --staged --quiet || git commit -m "Release Helm charts - $(date +'%Y-%m-%d %H:%M:%S')" | |
| git push | |
| - name: Summary | |
| run: | | |
| echo "## Helm Chart Released 📦" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Published Charts" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| for chart in .helm-packages/*.tgz; do | |
| echo "- \`$(basename $chart)\`" >> $GITHUB_STEP_SUMMARY | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Add Repository" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY | |
| echo "helm repo add freeradius https://cepat-kilat-teknologi.github.io/freeradius-stack" >> $GITHUB_STEP_SUMMARY | |
| echo "helm repo update" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY |