From 8e197a528cbef30125de50c4cde9d7698b94b77b Mon Sep 17 00:00:00 2001 From: Preslav Date: Mon, 21 Oct 2024 16:06:05 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20GH=20action.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Preslav --- .github/env | 1 + .github/{workflows => }/pr-body.md | 0 .github/workflows/code-gen.yaml | 6 +++--- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .github/env rename .github/{workflows => }/pr-body.md (100%) diff --git a/.github/env b/.github/env new file mode 100644 index 0000000..e6a968b --- /dev/null +++ b/.github/env @@ -0,0 +1 @@ +golang-version=1.23.0 diff --git a/.github/workflows/pr-body.md b/.github/pr-body.md similarity index 100% rename from .github/workflows/pr-body.md rename to .github/pr-body.md diff --git a/.github/workflows/code-gen.yaml b/.github/workflows/code-gen.yaml index 652d8fe..acaea05 100644 --- a/.github/workflows/code-gen.yaml +++ b/.github/workflows/code-gen.yaml @@ -36,10 +36,10 @@ jobs: - name: Check git diff id: git-diff run: | - git diff --exit-code . - echo "GIT_DIFF=$?" >> $GITHUB_OUTPUT + DIFF=$(git status --porcelain | wc -l) + echo "GIT_DIFF=${DIFF}" >> $GITHUB_OUTPUT - name: Create PR - if: steps.git-diff.outputs.GIT_DIFF == '1' + if: steps.git-diff.outputs.GIT_DIFF != '0' id: cpr uses: peter-evans/create-pull-request@v6 with: