chore: controller utils updates #178
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: Check | |
on: | |
push: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
- reopened | |
jobs: | |
check-latest-commit: | |
name: Check Latest Commit Message | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Check Latest Commit Message | |
run: make test-commit | |
check-commits: | |
name: Check Commit Messages | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Get PR Commits | |
id: get-pr-commits | |
uses: tim-actions/get-pr-commits@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Commit Messages | |
uses: tim-actions/[email protected] | |
with: | |
commits: ${{ steps.get-pr-commits.outputs.commits }} | |
pattern: '^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)(\n.*)*$' | |
error: | | |
commit message check failed: | |
message is not conventional commits format | |
please see https://www.conventionalcommits.org/en/v1.0.0/#specification | |
check-pull-request-title: | |
name: Check Pull Request Title | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Check Pull Request Title | |
uses: deepakputhraya/action-pr-title@master | |
with: | |
regex: '^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|¯\\_\(ツ\)_\/¯)(\(\w+\))?(!)?(: (.*\s*)*))|(Merge (.*\s*)*)|(Initial commit$)(\n.*)*$' | |
dco-check: | |
name: DCO Check | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get PR Commits | |
id: get-pr-commits | |
uses: tim-actions/get-pr-commits@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: DCO Check | |
uses: tim-actions/dco@master | |
with: | |
commits: ${{ steps.get-pr-commits.outputs.commits }} | |
license-check: | |
name: Check License Lines | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Check License Lines | |
uses: kt3k/[email protected] | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.57.1 | |
args: --timeout 3m |