neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 5b765fcab42308cd4d97a4c37da0c2b1cdb3514d
parent 38a20dd89f91c45ec8589bf1c50d50732882d38a
Author: dundargoc <gocdundar@gmail.com>
Date:   Mon, 27 Nov 2023 11:35:19 +0100

ci: fix api-docs workflow

`git diff-index` only works for tracked files, and unchanged
documentation files counts as untracked when shallow cloning.

Diffstat:
M.github/workflows/api-docs.yml | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml @@ -27,11 +27,8 @@ jobs: - name: Generate docs run: | make doc - printf 'UPDATED_DOCS=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - - - name: FAIL, PR has not committed doc changes - if: ${{ steps.docs.outputs.UPDATED_DOCS != 0 }} - run: | - echo "Job failed, run 'make doc' and commit your doc changes." - echo "The doc generation produces the following changes:" - git diff --color --exit-code + if [ -n "$(git status --porcelain)" ]; then + echo "::error::Job failed, run 'make doc' and commit your doc changes." + echo "::error::The doc generation produces the following changes:" + git diff --color --exit-code + fi