Skip to content

chore: disable ctrl-c for patch release #10244

chore: disable ctrl-c for patch release

chore: disable ctrl-c for patch release #10244

Workflow file for this run

name: ci
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
command: [compile-linux, compile-windows, compile-darwin]
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Check out code
uses: actions/checkout@v2
- name: Package custom resources
run: make package-custom-resources
- name: Build binaries
run: make ${{matrix.command}}
- name: Cleanup
run: make package-custom-resources-clean
mocks:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Check out code
uses: actions/checkout@v2
- name: Generate mocks
run: make gen-mocks
- name: Print out local diff after mockgen
run: |
git status --porcelain=v1 1>gitstatus.txt
cat gitstatus.txt
- name: Check for nonzero diff
run: "[ -z \"$(cat gitstatus.txt)\" ] && echo \"Generated mocks all match\""
test:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Check out code
uses: actions/checkout@v2
- name: Run tests
run: make local-test
- name: Upload golang coverage report to CodeCov
uses: codecov/codecov-action@v3
with:
files: ./coverage.out
- name: Upload node coverage report to CodeCov
uses: codecov/codecov-action@v3
with:
directory: cf-custom-resources/
staticcheck:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Check out code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
args: --timeout 5m0s
license:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Check out code
uses: actions/checkout@v2
- name: Run license check
run: ./scripts/license.sh .
conventional-commits:
runs-on: ubuntu-latest
steps:
- name: validate
uses: actions/github-script@v6
with:
script: |
// See https://gist.github.com/marcojahn/482410b728c31b221b70ea6d2c433f0c#file-conventional-commit-regex-md
const regex = /^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)/g;
const pr = context.payload.pull_request;
const title = pr.title;
if (title.match(regex) == null) {
throw `PR title "${title}"" does not match conventional commits from https://www.conventionalcommits.org/en/v1.0.0/`
}