chore: adopt annotions and remove gosec from codeql and move templates to .github repo #603
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 for diff after manifest and generated targets | |
on: | |
pull_request: {} | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
diff-check-manifests: | |
name: Check for diff | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: '${{ github.workspace }}/go.mod' | |
- name: Restore Go cache | |
uses: actions/cache@v4 | |
with: | |
path: /home/runner/work/_temp/_github_home/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Lint | |
run: make lint | |
- name: Make manifests && generate | |
run: | | |
make manifests && make generate | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
- name: Check for diff | |
run: | | |
gitStatus="$(git status --porcelain)" | |
if [[ -z "${gitStatus}" ]]; then | |
exit 0 | |
fi | |
echo "${gitStatus}" | |
exit 1 |