From dd3f6a2d6ca622a549cc878c7db9ba96aa2212e6 Mon Sep 17 00:00:00 2001 From: takase1121 <20792268+takase1121@users.noreply.github.com> Date: Sat, 1 Jan 2022 20:00:55 +0800 Subject: run CI only if generated file changed --- .github/workflows/workflow.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index e2d3662..ff94ce7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -17,7 +17,11 @@ jobs: cd scripts npm install npm run main -- "https://github.com/${{ github.repository }}/blob/${GITHUB_REF##*/}/" ../README.md ../README.md + cd .. + git diff --exit-code -s README.md + echo "has_diff=$?" >> $GITHUB_ENV - name: create PR + if: env.has_diff == 1 uses: peter-evans/create-pull-request@v3 with: commit-message: Reorganize README.md -- cgit v1.2.3