update localstack helm chart to default to localstack-pro (#148) #179
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, Test, Release | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'README.md' | |
| branches: | |
| - main | |
| pull_request: | |
| paths-ignore: | |
| - 'README.md' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2 | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run chart-testing (lint) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct lint --target-branch ${{ github.event.repository.default_branch }} --validate-maintainers=false --chart-repos "bitnami=https://charts.bitnami.com/bitnami" --check-version-increment=false | |
| - name: Create kind cluster | |
| if: steps.list-changed.outputs.changed == 'true' | |
| uses: helm/kind-action@v1 | |
| - name: Create LocalStack auth token secret | |
| if: steps.list-changed.outputs.changed == 'true' | |
| # LocalStack requires an auth token for all installations | |
| # The LOCALSTACK_AUTH_TOKEN secret must be configured in the GitHub repository settings | |
| run: | | |
| kubectl create namespace testing | |
| kubectl create secret generic --namespace testing localstack-auth-token \ | |
| --from-literal=auth-token="${{ secrets.LOCALSTACK_AUTH_TOKEN }}" | |
| - name: Run chart-testing (install) | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: ct install --target-branch ${{ github.event.repository.default_branch }} --namespace testing | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint-test | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| 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 | |
| # Add all dependencies of all charts in this repo with "helm repo add" | |
| # https://github.com/helm/chart-releaser-action/issues/74#issuecomment-1206111172 | |
| - name: Add dependent Helm repos | |
| run: | | |
| for dir in $(ls -d charts/*/); do | |
| helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done | |
| done | |
| - name: Run chart-releaser | |
| uses: helm/chart-releaser-action@v1.7.0 | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| with: | |
| # skip the release if the release already exists (release is unwanted and would fail) | |
| skip_existing: true |