Skip to content

Commit

Permalink
ci(update): add insertions checks
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <git@dw1.io>
  • Loading branch information
dwisiswant0 committed Oct 20, 2024
1 parent 1fc4604 commit ae621d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ jobs:
- name: "Update DB..."
if: steps.check.outputs.isUpdated == 'false'
run: curl -kLo ${{ env.DB_PATH }} ${{ secrets.REMOTE_DB }}
run: |
curl -kLo ${{ env.DB_PATH }} ${{ secrets.REMOTE_DB }}
insertions=$(git diff --stat ${{ env.DB_PATH }} | awk '/insertions/ {print $4}')
if [[ "${insertions}" -lt 1 ]]; then
echo "isUpdated=true" >> $GITHUB_OUTPUT
git stash
fi
- name: Create Pull Request
if: steps.check.outputs.isUpdated == 'false'
Expand Down

0 comments on commit ae621d4

Please sign in to comment.