Skip to content

Commit

Permalink
Add CI job to check database update
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed May 7, 2024
1 parent 8cb0f96 commit 293b199
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check
on:
pull_request:
paths:
- assets/**

jobs:
check_database_update:
name: Check libphonenumber database update
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update assets
run: ./assets/update.sh
- name: Check git status
run: |
if [[ -n "$(git status --porcelain=v2)" ]];
then
echo "Found untracked or uncommitted files after updating the libphonenumber database, failing."
exit 1
fi
1 change: 1 addition & 0 deletions assets/update.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -eu
cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd

GIT_REF=v8.13.35
TMP_CLONE_DIR=$(mktemp -d)
Expand Down

0 comments on commit 293b199

Please sign in to comment.