-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (43 loc) · 1.53 KB
/
update_bornes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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