Minimal level-triggered controller #563
Workflow file for this run
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: | |
branches: | |
- main | |
paths-ignore: | |
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | |
- "charts/**" | |
- "docs/**" | |
- "hack/**" | |
- "*.md" | |
pull_request_target: | |
types: | |
- closed | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
cache: true | |
- name: Prepare | |
run: | | |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc | |
- name: Lint | |
run: make lint | |
lint-chart: | |
runs-on: ubuntu-latest | |
steps: | |
- run: 'echo "No lint for Helm chart required"' | |
verify-tidy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
cache: true | |
- name: Prepare | |
run: | | |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc | |
- name: Verify | |
run: make verify-tidy | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
cache: true | |
- name: Prepare | |
run: | | |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc | |
- name: Test | |
run: make test | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # for actions/checkout to fetch code | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
cache: true | |
- name: Prepare # .netrc is used by docker-build, ~/.netrc is used by go test | |
run: echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" | tee ~/.netrc .netrc | |
- name: Build | |
run: make docker-build | |