Build and test #51
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
on: | |
schedule: | |
- cron: '5 11 * * 2' | |
push: | |
paths-ignore: | |
- 'charts/**' | |
- 'docs/**' | |
- '/*.md' | |
branches: | |
- 'main' | |
- 'release-*' | |
pull_request: | |
branches: | |
- 'main' | |
- 'release-*' | |
paths-ignore: | |
- 'charts/**' | |
- 'docs/**' | |
- '/*.md' | |
workflow_call: | |
name: Build and test | |
jobs: | |
codql-build: | |
permissions: | |
security-events: write | |
strategy: | |
matrix: | |
architecture: [amd64] | |
os: [linux] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.20.x | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.20.x | |
id: go | |
- name: Cache Go modules packages | |
uses: actions/cache@v2.1.7 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Download Go modules | |
run: go mod download | |
env: | |
GOPROXY: https://proxy.golang.org | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: go | |
- name: Build | |
run: GOOS=${{ matrix.os }} GOARCH=${{matrix.architecture}} go build -o bin/thundering-herd-scheduler ./cmd/thundering-herd-scheduler | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |