oci-karpenter #570
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: Release Charts | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - unstable | |
| pull_request: | |
| branches: | |
| - main | |
| - unstable | |
| jobs: | |
| lint-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/[email protected] | |
| with: | |
| version: v3.17.0 | |
| - uses: actions/[email protected] | |
| with: | |
| python-version: '3.12' | |
| check-latest: false | |
| - name: Set up chart-testing | |
| uses: helm/[email protected] | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }}) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Run chart-testing (lint) | |
| run: ct lint --debug --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} | |
| - name: Create kind cluster | |
| uses: helm/[email protected] | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run chart-testing (install) | |
| run: ct install --config .ct.yaml --target-branch ${{ github.event.repository.default_branch }} | |
| packages: | |
| if: github.event_name == 'push' | |
| needs: lint-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Git | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Bright Security" | |
| - name: Change name to unstable | |
| if: ${{ github.ref == 'refs/heads/unstable' }} | |
| run: | | |
| sed -i 's/brokencrystals/brokencrystals-unstable/g' ./charts/brokencrystals/Chart.yaml | |
| sed -i 's/brkn/brkn-unstbl/g' ./charts/brokencrystals/Chart.yaml | |
| - name: Change values to development | |
| if: ${{ github.ref == 'refs/heads/unstable' }} | |
| run: | | |
| sed -i 's/^ main:.*/ main: unstable/' ./charts/brokencrystals/values.yaml | |
| sed -i 's/^ client:.*/ client: unstable/' ./charts/brokencrystals/values.yaml | |
| - name: Release packages main | |
| uses: helm/[email protected] | |
| env: | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| CR_SKIP_EXISTING: true |