DOC/MINOR: use dockerhub image for controller example deployment #5
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 | ||
|
Check failure on line 1 in .github/workflows/actions.yml
|
||
| on: [push, pull_request] | ||
| jobs: | ||
| check: | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| name: HAProxy check commit message | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Install Task | ||
| uses: go-task/setup-task@v1 | ||
| with: | ||
| version: 3.x | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: commit-policy | ||
| run: task check-commit | ||
| generate-doc: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Install Task | ||
| uses: go-task/setup-task@v1 | ||
| with: | ||
| version: 3.x | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: prepare taskfile | ||
| run: "sed -i 's/internal: true/internal: false/g' taskfile/generate.yml" | ||
| - name: generating documentation | ||
| run: task generate | ||
| - name: reset taskfile | ||
| run: "sed -i 's/internal: false/internal: true/g' taskfile/generate.yml" | ||
| - name: changes | ||
| run: test -z "$(git diff 2> /dev/null)" || exit "Documentation is not generated, issue \`task ci\` and commit the result" | ||
| - name: untracked files | ||
| run: test -z "$(git ls-files --others --exclude-standard 2> /dev/null)" || exit "Documentation created untracked files, cannot proceed" | ||
| generate-code: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Install Task | ||
| uses: go-task/setup-task@v1 | ||
| with: | ||
| version: 3.x | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: prepare taskfile | ||
| run: "sed -i 's/internal: true/internal: false/g' taskfile/generate.yml" | ||
| - name: generating code | ||
| run: task controller-gen | ||
| - name: reset taskfile | ||
| run: "sed -i 's/internal: false/internal: true/g' taskfile/generate.yml" | ||
| - name: changes | ||
| run: test -z "$(git diff 2> /dev/null)" || exit "code generation is not run, issue \`task ci\` and commit the result" | ||
| - name: untracked files | ||
| run: test -z "$(git ls-files --others --exclude-standard 2> /dev/null)" || exit "Documentation created untracked files, cannot proceed" | ||
| tidy: | ||
| name: go mod tidy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: "go.mod" | ||
| check-latest: true | ||
| - name: tidy | ||
| run: go mod tidy | ||
| - name: changes | ||
| run: test -z "$(git diff 2> /dev/null)" || exit "Go modules not tidied, issue \`go mod tidy\` and commit the result" | ||
| gofumpt: | ||
| name: gofumpt | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Install Task | ||
| uses: go-task/setup-task@v1 | ||
| with: | ||
| version: 3.x | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: prepare taskfile | ||
| run: "sed -i 's/internal: true/internal: false/g' taskfile/generate.yml" | ||
| - name: tidy | ||
| run: task format | ||
| - name: reset taskfile | ||
| run: "sed -i 's/internal: false/internal: true/g' taskfile/generate.yml" | ||
| - name: changes | ||
| run: test -z "$(git diff 2> /dev/null)" || exit "Go code not formatted, issue \`make gofumpt\` and commit the result" | ||
| lint: | ||
| name: golangci-lint | ||
| needs: ["generate", "tidy"] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Install Task | ||
| uses: go-task/setup-task@v1 | ||
| with: | ||
| version: 3.x | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: reset taskfile | ||
| run: "sed -i 's/internal: false/internal: true/g' taskfile/generate.yml" | ||
| - name: Lint | ||
| run: | | ||
| task lint | ||
| - name: reset taskfile | ||
| run: "sed -i 's/internal: false/internal: true/g' taskfile/generate.yml" | ||
| build: | ||
| name: build | ||
| runs-on: ubuntu-latest | ||
| needs: ["lint"] | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: 'go.mod' | ||
| id: go | ||
| - name: Get dependencies | ||
| run: | | ||
| go mod tidy | ||
| - name: Build | ||
| run: | | ||
| go build -v . | ||