From 96ab1995627342e71047260e82941fe9ff0aa351 Mon Sep 17 00:00:00 2001 From: Timothy Messier Date: Thu, 16 Feb 2023 14:49:47 -0500 Subject: [PATCH] ci: Run make-gen-detla in github action (#2980) --- .github/workflows/make-gen-delta.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/make-gen-delta.yml diff --git a/.github/workflows/make-gen-delta.yml b/.github/workflows/make-gen-delta.yml new file mode 100644 index 0000000000..1d5f3a49f6 --- /dev/null +++ b/.github/workflows/make-gen-delta.yml @@ -0,0 +1,36 @@ +name: "make-gen-delta" +on: + - workflow_dispatch + - push + - workflow_call + +jobs: + make-gen-delta: + name: "Check for uncommited changes from make gen" + runs-on: ${{ fromJSON(vars.RUNNER) }} + steps: + - uses: actions/checkout@v3 + 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 "::set-output name=go-version::$(cat .go-version)" + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: "${{ steps.get-go-version.outputs.go-version }}" + - 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)"