Browse Source

chore(github-action): Fetch commit history

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

6
.github/workflows/publish-blog.yml

@ -10,9 +10,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check for change
with:
fetch-depth: 2
- 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=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since) = noco-blog ]] && echo 'OK')" >> $GITHUB_ENV
- uses: actions/setup-node@v2
if: ${{ env.CHANGED == 'OK' }}

6
.github/workflows/publish-book.yml

@ -10,9 +10,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check for change
with:
fetch-depth: 2
- 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=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since) = noco-book ]] && echo 'OK')" >> $GITHUB_ENV
- uses: actions/setup-node@v2
if: ${{ env.CHANGED == 'OK' }}

6
.github/workflows/publish-docs.yml

@ -10,9 +10,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check for change
with:
fetch-depth: 2
- 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=$([[ $(git log --pretty=format:'%h' -n 1 --skip 1 | xargs lerna ls --since) = noco-docs ]] && echo 'OK')" >> $GITHUB_ENV
- uses: actions/setup-node@v2
if: ${{ env.CHANGED == 'OK' }}

Loading…
Cancel
Save