Skip to content

Commit

Permalink
chore: fix deploy-nightly (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
0b5vr committed Feb 14, 2022
1 parent 52c047e commit 1aedfb7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ runs:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- name: Setup Git Config
shell: bash
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/deploy-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,27 @@ defaults:
shell: bash

jobs:
check_recent_commit:
runs-on: ubuntu-latest
outputs:
commited_recently: ${{ steps.commited_recently.outputs.commited_recently }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: dev
- name: Check Commits in the Previous 24h
id: commited_recently
run: |
if [[ $(git rev-list --after="24 hours" ${{ github.sha }}) != "" ]]; then
echo "::set-output name=commited_recently::1"
echo "[TRIGGERED]"
fi
deploy:
runs-on: ubuntu-latest
needs: check_recent_commit
if: ${{ needs.check_recent_commit.outputs.commited_recently == '1' }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down

0 comments on commit 1aedfb7

Please sign in to comment.