update-bornes #15
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: update-bornes | |
on: | |
workflow_dispatch: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
schedule: # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | |
- cron: '00 5 15 * *' # every 15th of the month at 05:00 UTC | |
env: | |
PYTHON_VERSION: '3.9' | |
POETRY_VERSION: '1.5.1' | |
jobs: | |
update-bornes: | |
runs-on: ubuntu-latest | |
env: | |
DATABASE: ${{ secrets.DATABASE }} | |
USER: ${{ secrets.USER }} | |
PASSWORD: ${{ secrets.PASSWORD }} | |
HOST: ${{ secrets.HOST }} | |
PORT: ${{ secrets.PORT }} | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Verify poetry.lock agrees with pyproject.toml | |
run: poetry lock --check | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-ansi --no-root | |
- name: RunBornesWorkflow | |
run: | | |
poetry run python e_cartomobile/data_load/bornes_to_score_workflow.py | |
- name: Push data to the repo | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git status | |
git add . | |
git commit -m "ci (update bornes and scores)" | |
git push origin main --force |