Skip to content

Commit 0ad2d14

Browse files
authored
Master gh 580 b dbip download workflow (#639)
* added dbip_download github workflow * change to run every day on midnight for QA * necesary changes to be able build dbip_country.rs on master * -p for generating ip_country/src
1 parent 0bedea4 commit 0ad2d14

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/dbip_download.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ jobs:
2525

2626
- name: Download DBIP data in MMDB format
2727
run: |
28-
cd ip_country
2928
export YEAR_MONTH=$(date +%Y-%m)
3029
echo "TEMP_DIR=$(mktemp -d)" >> $GITHUB_ENV
3130
echo "YEAR_MONTH=$YEAR_MONTH" >> $GITHUB_ENV
31+
git clone https://github.com/MASQ-Project/DBIP-Experiment.git dbipexperiment
32+
cd dbipexperiment/ip_country
3233
mkdir -p dbip-data
3334
curl -L -o dbip-data/dbip-country-lite.mmdb.gz "https://download.db-ip.com/free/dbip-country-lite-$YEAR_MONTH.mmdb.gz"
3435
gunzip dbip-data/dbip-country-lite.mmdb.gz
3536
3637
- name: Generate Rust source file
3738
run: |
38-
cd ip_country
39+
cd dbipexperiment/ip_country
3940
cargo run < "dbip-data/dbip-country-lite.mmdb" > "$TEMP_DIR"/dbip_country.rs
4041
ls "$TEMP_DIR"
4142
@@ -45,7 +46,7 @@ jobs:
4546
git config user.email "github-actions[bot]@users.noreply.github.com"
4647
git checkout -B generated-source
4748
git rm -rf .
48-
mkdir ip_country/src
49+
mkdir -p ip_country/src
4950
mv "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs
5051
git add ip_country/src/dbip_country.rs
5152
git commit -m "Update generated dbip_country ${YEAR_MONTH} Rust source file"

0 commit comments

Comments
 (0)