-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.33 KB
/
compute_daily.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
name: Run compute_daily script
on:
workflow_dispatch: {}
schedule:
- cron: '59 23 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up datetime variables
id: date
run: |
echo "::set-output name=year::$(date -d yesterday +'%Y')"
echo "::set-output name=month::$(date -d yesterday +'%m')"
echo "::set-output name=day::$(date -d yesterday +'%d')"
env:
TZ: /usr/share/zoneinfo/Europe/Madrid
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10' # install the python version needed
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: execute compute_daily script
run: python ${GITHUB_WORKSPACE}/scripts/compute_daily.py --year=${{ steps.date.outputs.year }} --month=${{ steps.date.outputs.month }} --day=${{ steps.date.outputs.day }}
- name: Commit structure to git repo
uses: EndBug/add-and-commit@v9
with:
message: Cálculo automático
author_name: javi-aranda
committer_name: javi-aranda
commit: --signoff