44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: "make-gen-delta"
|
|
on:
|
|
- workflow_dispatch
|
|
- push
|
|
- pull_request
|
|
- workflow_call
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
make-gen-delta:
|
|
name: "Check for uncommitted changes from make gen"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Determine Go version
|
|
id: get-go-version
|
|
# We use .go-version as our source of truth for current Go
|
|
# version, because "goenv" can react to it automatically.
|
|
run: |
|
|
echo "Building with Go $(cat .go-version)"
|
|
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
|
|
- name: Set up Go
|
|
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
|
|
with:
|
|
go-version: "${{ steps.get-go-version.outputs.go-version }}"
|
|
- name: Running go mod tidy
|
|
run: |
|
|
go mod tidy
|
|
- name: Install Dependencies
|
|
run: |
|
|
make tools
|
|
- name: Running make gen
|
|
run: |
|
|
make gen
|
|
- name: Check for changes
|
|
run: |
|
|
git diff --exit-code
|
|
git status --porcelain
|
|
test -z "$(git status --porcelain)"
|