commit check action #1
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: Commit check | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
commit-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Setup golang | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Generate | |
run: make generate manifests add-license | |
- name: Check diff | |
run: | | |
[[ $(git diff) ]] && return 1 || return 0 |