forked from Sage-Bionetworks/sage-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.18 KB
/
update-oc-db-csv-files.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
name: Update OpenChallenges DB files
on:
schedule:
- cron: '0 0 * * *' # daily at 00:00 UTC
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false
fetch-depth: 0
- name: Create Google Client credentials file
uses: jsdaniell/[email protected]
with:
name: 'service_account.json'
json: ${{ secrets.GOOGLE_CLIENT_JSON }}
- name: Update dump files
run: |
python3 -m pip install --upgrade pip
pip install gspread pandas numpy
python3 apps/openchallenges/db-update/update_db_csv.py
- name: Get current date
run: |
echo "TODAY=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
- name: Push changes, then create or update pull request
uses: peter-evans/[email protected]
with:
title: 'chore(openchallenges): ${{ env.TODAY }} DB update'
body: Daily OC database update(s)
commit-message: '${{ env.TODAY }}: add latest CSV dump files'
branch: openchallenges/db-update