This repository was archived by the owner on Aug 20, 2025. It is now read-only.
react-server: Add checksum in deployment for config change #7
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: Lint/Builds/Push Helm charts to Github Registry | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'toggle/**' | |
| permissions: | |
| packages: write | |
| jobs: | |
| build: | |
| name: Publish Helm | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - chart: react-serve | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Helm | |
| uses: azure/setup-helm@v3 | |
| # Lint/Build | |
| - name: Helm dependency | |
| working-directory: ./toggle/${{ matrix.chart }} | |
| run: | | |
| yq --indent 0 '.dependencies | map(["helm", "repo", "add", .name, .repository] | join(" ")) | .[]' ./Chart.lock | sh -- | |
| helm dependency build ./ | |
| - name: 🐳 Helm lint | |
| working-directory: ./toggle/${{ matrix.chart }} | |
| run: helm lint ./ --values ./values-test.yaml | |
| - name: 🐳 Helm template | |
| working-directory: ./toggle/${{ matrix.chart }} | |
| run: helm template ./ --values ./values-test.yaml | |
| # Publish | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| if: ${{ github.event_name == 'push' }} | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Package Helm Chart | |
| working-directory: ./toggle/${{ matrix.chart }} | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| helm package ./ -d .helm-charts | |
| - name: Push Helm Chart | |
| working-directory: ./toggle/${{ matrix.chart }} | |
| if: ${{ github.event_name == 'push' }} | |
| env: | |
| OCI_REPO: oci://ghcr.io/${{ github.repository }} | |
| run: | | |
| OCI_REPO=$(echo $OCI_REPO | tr '[:upper:]' '[:lower:]') | |
| PACKAGE_FILE=$(ls .helm-charts/*.tgz | head -n 1) | |
| echo "## Helm Chart" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Helm push output:" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo '```bash' >> $GITHUB_STEP_SUMMARY | |
| helm push "$PACKAGE_FILE" $OCI_REPO >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY |