From 855aeb5afc3f6c50bb334a9ee15a3c48f14adfb4 Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Fri, 16 Jul 2021 17:19:42 +0530 Subject: [PATCH] chore(github-action): Check changes since previous commit Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- .github/workflows/publish-blog.yml | 4 ++-- .github/workflows/publish-book.yml | 4 ++-- .github/workflows/publish-docs.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-blog.yml b/.github/workflows/publish-blog.yml index e780e08d45..ba246919d1 100644 --- a/.github/workflows/publish-blog.yml +++ b/.github/workflows/publish-blog.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 2 + fetch-depth: 0 - name: Check for update run: | - echo "CHANGED=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since | grep noco-blog) = noco-blog ]] && echo 'OK')" >> $GITHUB_ENV + echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep noco-blog) = noco-blog ]] && echo 'OK')" >> $GITHUB_ENV - uses: actions/setup-node@v2 if: ${{ env.CHANGED == 'OK' }} diff --git a/.github/workflows/publish-book.yml b/.github/workflows/publish-book.yml index 91110785b3..47f5563377 100644 --- a/.github/workflows/publish-book.yml +++ b/.github/workflows/publish-book.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 2 + fetch-depth: 0 - name: Check for update run: | - echo "CHANGED=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since | grep noco-book) = noco-book ]] && echo 'OK')" >> $GITHUB_ENV + echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep noco-book) = noco-book ]] && echo 'OK')" >> $GITHUB_ENV - uses: actions/setup-node@v2 if: ${{ env.CHANGED == 'OK' }} diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 843db1822f..b1a317cd57 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 2 + fetch-depth: 0 - name: Check for update run: | - echo "CHANGED=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since | grep noco-docs) = noco-docs ]] && echo 'OK')" >> $GITHUB_ENV + echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep noco-docs) = noco-docs ]] && echo 'OK')" >> $GITHUB_ENV - uses: actions/setup-node@v2 if: ${{ env.CHANGED == 'OK' }}