fix(chart): let appVersion select the image instead of a pinned digest #199
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: CI | |
| on: | |
| pull_request: | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| run: go build ./... | |
| - name: Test | |
| run: go test $(go list ./... | grep -v keess/tests/e2e) | |
| - name: Detect changed files | |
| id: changes | |
| run: | | |
| BASE="${{ github.event.pull_request.base.sha }}" | |
| HEAD="${{ github.event.pull_request.head.sha }}" | |
| CHANGED=$(git diff --name-only "$BASE" "$HEAD") | |
| DOCKER_CHANGES=$(echo "$CHANGED" | grep '^Dockerfile' | grep -v '\.dockerignore$' || true) | |
| CHART_CHANGES=$(echo "$CHANGED" | grep '^chart/' || true) | |
| if [ -n "$DOCKER_CHANGES" ]; then | |
| echo "has_dockerfiles=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_dockerfiles=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| if [ -n "$CHART_CHANGES" ]; then | |
| echo "has_chart=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "has_chart=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install goreleaser | |
| if: steps.changes.outputs.has_dockerfiles == 'true' | |
| uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| install-only: true | |
| - name: Docker build | |
| if: steps.changes.outputs.has_dockerfiles == 'true' | |
| run: make docker-build | |
| - name: Install Helm | |
| if: steps.changes.outputs.has_chart == 'true' | |
| uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 | |
| - name: Helm lint | |
| if: steps.changes.outputs.has_chart == 'true' | |
| run: helm lint chart/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 | |
| with: | |
| version: v2.13.1 |