-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (48 loc) · 1.47 KB
/
pol.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
49
50
51
name: "AEA: Economic Policy"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
tags:
description: 'Manual trigger'
jobs:
printInputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Log level: ${{ github.event.inputs.logLevel }}"
echo "Tags: ${{ github.event.inputs.tags }}"
job_id:
name: "AEA: Economic Policy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run script
run: |
# scrape AEA deposit
python src/aea.py -j pol
- name: Commit changes
env:
USER_EMAIL: ${{ secrets.USER_EMAIL }}
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.TOKEN }}
run: |
git config --global user.email ${USER_EMAIL}
git config --global user.name ${USER_NAME}
git remote set-url origin https://${USER_NAME}:${ACCESS_TOKEN}@github.com/${USER_NAME}/replication-code-economics.git
git add data/aea/*
git diff-index --quiet HEAD || git commit -m "Added AEA deposit data"
git pull --no-rebase origin main
git push -u origin main