-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add workflow to check db freshness
- Loading branch information
1 parent
569998d
commit 41ee379
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |