Skip to content

ci: uci/copy-templates #3

ci: uci/copy-templates

ci: uci/copy-templates #3

Workflow file for this run

name: Make gen and check diff
on:
pull_request:
push:
branches: ["master"]
workflow_dispatch:
jobs:
check-diff:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install dependencies
run: go mod download
- name: Run make gen
run: make gen
- name: Check for changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
if ! git diff --exit-code; then
echo "Code generation resulted in changes. Please commit the changes." >&2
exit 1
fi