Build database #1826
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
name: Build database | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oleksiyrudenko/gha-git-credentials@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Installing deps | |
run: pip install -r requirements.txt | |
- name: Build | |
run: python src/main.py | |
- name: Test | |
run: python src/example.py | |
- uses: EndBug/add-and-commit@v4 | |
with: | |
add: . | |
message: Updated database | |
- name: Push changes and the new tag | |
run: git push --follow-tags | |
- name: Release | |
run: | | |
(gh release delete latest || true) > /dev/null 2>&1 | |
gh release create latest ./data/*.mmdb |