Browse Source

chore(github-action): Check changes since previous commit

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/153/head
Pranav C 3 years ago
parent
commit
855aeb5afc
  1. 4
      .github/workflows/publish-blog.yml
  2. 4
      .github/workflows/publish-book.yml
  3. 4
      .github/workflows/publish-docs.yml

4
.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' }}

4
.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' }}

4
.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' }}

Loading…
Cancel
Save