Skip to content

Commit

Permalink
ci: add workflow to check db freshness
Browse files Browse the repository at this point in the history
  • Loading branch information
sgliner-ledger committed Aug 23, 2023
1 parent 569998d commit 41ee379
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/check_outdated_build_db.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check outdated build db

on:
push:

jobs:
compare_files:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build db
run: |
python3 create_app_list/main.py --output_file out.json
- name: Compare Files
run: |
# Compare two files using diff
diff -q out.json build_files/build.json
# Store the exit code of the diff command
DIFF_EXIT_CODE=$?
# If exit code is 0, files are the same; if not, they are different
if [ $DIFF_EXIT_CODE -ne 0 ]; then
echo "Files are different!"
exit 1 # Fail the workflow
else
echo "Files are the same!"
fi

0 comments on commit 41ee379

Please sign in to comment.