Users/hpn/implement postg rest auto api template #33
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: Operator CI | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "apps/operator/**" | |
| - "cue/**" | |
| pull_request: | |
| branches: [main, "features/*"] | |
| paths: | |
| - "apps/operator/**" | |
| - "cue/**" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/operator | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache-dependency-path: apps/operator/go.sum | |
| - name: Run linter | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.11.3 | |
| working-directory: apps/operator | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: apps/operator | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.26" | |
| cache-dependency-path: apps/operator/go.sum | |
| - name: Run tests | |
| run: make test | |
| - name: Check generated code is up-to-date | |
| run: git diff --exit-code | |
| build: | |
| name: Docker Build | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Build image | |
| run: docker build -t operator:ci -f apps/operator/Dockerfile . |