chore: bump chart version to 0.0.9-2 #2
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: Sync Helm Version to Docs | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'helm/rexec/Chart.yaml' | ||
| workflow_dispatch: | ||
| jobs: | ||
| sync-version: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| outputs: | ||
| docs_changed: ${{ steps.commit.outputs.changed }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Read chart version | ||
| id: chart | ||
| run: | | ||
| VERSION=$(grep '^version:' helm/rexec/Chart.yaml | awk '{print $2}') | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| - name: Update version in docs HTML files | ||
| run: | | ||
| VERSION="${{ steps.chart.outputs.version }}" | ||
| # Update nav-version badges (e.g. v0.0.8 → v0.0.9) | ||
| find docs -name "*.html" -exec \ | ||
| sed -i "s/v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*/v${VERSION}/g" {} + | ||
| # Update the version table row in helm-chart.html | ||
| sed -i \ | ||
| "s|<td>version</td><td>[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*</td>|<td>version</td><td>${VERSION}</td>|g" \ | ||
| docs/helm-chart.html | ||
| - name: Commit and push if docs changed | ||
| id: commit | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add docs/ | ||
| if git diff --cached --quiet; then | ||
| echo "Docs already up to date." | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| git commit -m "docs: bump helm chart version to v${{ steps.chart.outputs.version }}" | ||
| git push origin main | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| deploy: | ||
|
Check failure on line 55 in .github/workflows/sync-docs-version.yaml
|
||
| needs: sync-version | ||
| if: needs.sync-version.outputs.docs_changed == 'true' | ||
| uses: ./.github/workflows/deploy-docs.yaml | ||