Skip to content
11 changes: 8 additions & 3 deletions .github/workflows/dbip_download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -B generated-source
git rm -rf .
mkdir -p ip_country/src
if [[ "$(git ls-remote --heads 2>/dev/null | grep generated-sources)" == "" ]]
then
git checkout -B generated-source
git rm -rf .
mkdir -p ip_country/src
else
git checkout generated-source
fi
mv "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs
git add ip_country/src/dbip_country.rs
git commit -m "Update generated dbip_country ${YEAR_MONTH} Rust source file"
Expand Down
Loading