Skip to content

Commit 566e5f4

Browse files
committed
Add dispatch job
1 parent 50deecc commit 566e5f4

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Update the CMOR CVs table when triggered
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
repository:
6+
description: 'The repository from which the slash command was dispatched'
7+
required: true
8+
comment-id:
9+
description: 'The comment-id of the slash command'
10+
required: true
11+
12+
jobs:
13+
update-cmor-cvs-table:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out repository
17+
uses: actions/checkout@v4
18+
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.13"
22+
23+
- name: Set up and install esgvoc
24+
env:
25+
# Modify these as needed
26+
ESGVOC_FORK: "znichollscr"
27+
ESGVOC_REVISION: "5145b8f6d8b1859c663e63fb7b0bad952e8bc7b5"
28+
# Modify these as needed
29+
UNIVERSE_CVS_FORK: "znichollscr"
30+
UNIVERSE_CVS_BRANCH: "cmip-description"
31+
CMIP7_CVS_FORK: ${{ github.event.pull_request.head.repo.owner.login }}
32+
CMIP7_CVS_BRANCH: ${{ github.head_ref || github.ref_name }}
33+
run: |
34+
which pip
35+
pip install -r requirements-cmor-cvs-table.txt
36+
pip install --no-deps "git+https://github.com/$ESGVOC_FORK/esgf-vocab.git@$ESGVOC_REVISION"
37+
esgvoc config create cmip7-cvs-ci-export
38+
esgvoc config switch cmip7-cvs-ci-export
39+
40+
esgvoc config set "universe:github_repo=https://github.com/$UNIVERSE_CVS_FORK/WCRP-universe" "universe:branch=$UNIVERSE_CVS_BRANCH"
41+
esgvoc config add-project cmip7 --custom --repo "https://github.com/$CMIP7_CVS_FORK/CMIP7-CVs" --branch "$CMIP7_CVS_BRANCH"
42+
43+
esgvoc config remove-project -f cmip6
44+
esgvoc config remove-project -f cmip6plus
45+
esgvoc install
46+
47+
- name: Update CMOR CVs table
48+
run: |
49+
esgvoc cmor-export-cvs-table --out-path cmor-cvs.json
50+
51+
git diff

0 commit comments

Comments
 (0)