Merge pull request #198 from flatcar/invidian/updates #396
This file contains 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: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Run CI checks | |
run: make ci | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
container: golangci/golangci-lint:v1.53.3 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run lint | |
run: | | |
# Required to avoid error 'fatal: detected dubious ownership in repository at' while calling | |
# 'git status --porcelain'. | |
# See https://github.com/actions/checkout/issues/1048 for more details. | |
git config --global --add safe.directory /__w/flatcar-linux-update-operator/flatcar-linux-update-operator | |
make lint check-update-linters | |
codespell: | |
name: Codespell | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Codespell test | |
uses: codespell-project/actions-codespell@master | |
with: | |
skip: ./.git,./vendor,./bin,./go.sum | |
ignore_words_file: '.codespell.ignorewords' | |
check_filenames: true | |
check_hidden: true | |
image: | |
name: Image | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Test building Docker image | |
run: make image | |
changelog: | |
name: Changelog | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.20' | |
- name: Install required binaries | |
run: GOBIN=/usr/local/bin make install-changelog | |
- name: Check changelog format | |
run: make test-changelog | |
kustomize: | |
name: Kustomize | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Test rendering manifests using kustomize | |
run: make build-kustomize | |
semgrep: | |
name: Semgrep | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Use dedicated action for nice integration with GitHub. | |
- uses: returntocorp/semgrep-action@v1 |