fix: image type in template issue #94
Workflow file for this run
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: | |
| push: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**.md" | |
| - "vhs/**" | |
| pull_request: | |
| branches: [main, develop] | |
| paths-ignore: | |
| - "docs/**" | |
| - "**.md" | |
| - "vhs/**" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Add Go bin to PATH | |
| run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Install golangci-lint | |
| run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.5.0 | |
| - name: Run linters | |
| run: make lint | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Run unit tests | |
| run: make test | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Build | |
| run: make build | |
| format: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Add Go bin to PATH | |
| run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Install goimports | |
| run: go install golang.org/x/tools/cmd/goimports@latest | |
| - name: Check formatting | |
| run: | | |
| make fmt | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "Code is not formatted. Please run 'make fmt'" | |
| git diff | |
| exit 1 | |
| fi | |
| mod-tidy: | |
| name: Go Mod Tidy Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Check go mod tidy | |
| run: | | |
| go mod tidy | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "go.mod or go.sum is not tidy. Please run 'go mod tidy'" | |
| git diff | |
| exit 1 | |
| fi | |
| vuln-scan: | |
| name: Vulnerability Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.9" | |
| cache: true | |
| - name: Add Go bin to PATH | |
| run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
| - name: Install govulncheck | |
| run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
| - name: Run govulncheck | |
| run: govulncheck ./... | |
| ci-success: | |
| name: All CI Checks Passed | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: [lint, test, build, format, mod-tidy, vuln-scan] | |
| steps: | |
| - name: Check results | |
| run: | | |
| for result in "${{ needs.lint.result }}" "${{ needs.test.result }}" "${{ needs.build.result }}" "${{ needs.format.result }}" "${{ needs.mod-tidy.result }}" "${{ needs.vuln-scan.result }}"; do | |
| if [ "$result" != "success" ]; then | |
| echo "One or more CI checks failed" | |
| exit 1 | |
| fi | |
| done | |
| echo "All CI checks passed successfully!" |