-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.37 KB
/
update.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
52
53
54
55
# This is a basic workflow that is manually triggered
name: update euro-cordex simulation list
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- "*"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
update:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: update tables
env:
WANDB_CONSOLE: "off"
run: |
python access-esgf.py
- name: Check if there are any changes in the table
id: verify_diff
run: |
git diff --quiet euro-cordex-esgf.csv || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit and push
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
#(pre-commit run --all-files) || true
git commit euro-cordex-esgf.* -m "update table"
git status
git push