Skip to content

Commit aeae56c

Browse files
authored
Master gh 580 b dbip download workflow (#641)
* 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 * todo in dbip_download.yaml * condition for new branch generated-source * fixing condition for generated-source branch
1 parent 0ad2d14 commit aeae56c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/dbip_download.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ jobs:
4444
run: |
4545
git config user.name "github-actions[bot]"
4646
git config user.email "github-actions[bot]@users.noreply.github.com"
47-
git checkout -B generated-source
48-
git rm -rf .
49-
mkdir -p ip_country/src
47+
if [[ "$(git ls-remote --heads 2>/dev/null | grep generated-sources)" == "" ]]
48+
then
49+
git checkout -B generated-source
50+
git rm -rf .
51+
mkdir -p ip_country/src
52+
else
53+
git checkout generated-source
54+
fi
5055
mv "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs
5156
git add ip_country/src/dbip_country.rs
5257
git commit -m "Update generated dbip_country ${YEAR_MONTH} Rust source file"

0 commit comments

Comments
 (0)