From d660a1b420c891973f4aca3fb0e7edbef4a6309e Mon Sep 17 00:00:00 2001 From: Bob Callaway <bcallawa@redhat.com> Date: Fri, 4 Dec 2020 15:05:02 -0500 Subject: [PATCH] check for changed files at end --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e608ceb..25823df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,8 +30,7 @@ jobs: run: $GITHUB_WORKSPACE/swagger validate openapi.yaml # Make it - name: Build - run: | - make -C $GITHUB_WORKSPACE all + run: make -C $GITHUB_WORKSPACE all # Lint it - name: golangci-lint uses: golangci/golangci-lint-action@v2 @@ -47,4 +46,5 @@ jobs: GOROOT: "" with: args: ./... - #TODO: add check that ensures we didn't generate different code than what was checked out + - name: Ensure no files were modified as a result of the build + run: git update-index --refresh && git diff-index --quiet HEAD -- -- GitLab