update-cmor-cvs-table-command #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Update the CMOR CVs table when triggered | |
| name: update-cmor-cvs-table-command | |
| on: | |
| workflow_dispatch: | |
| types: [update-cmor-cvs-table-command] | |
| inputs: | |
| repository: | |
| description: 'The repository from which the slash command was dispatched' | |
| required: true | |
| comment-id: | |
| description: 'The comment-id of the slash command' | |
| required: true | |
| jobs: | |
| update-cmor-cvs-table: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.client_payload.pull_request.head.ref }} | |
| token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up and install esgvoc | |
| env: | |
| # Modify these as needed | |
| ESGVOC_FORK: "znichollscr" | |
| ESGVOC_REVISION: "5145b8f6d8b1859c663e63fb7b0bad952e8bc7b5" | |
| # Modify these as needed | |
| UNIVERSE_CVS_FORK: "znichollscr" | |
| UNIVERSE_CVS_BRANCH: "cmip-description" | |
| CMIP7_CVS_FORK: ${{ github.event.client_payload.pull_request.head.repo.owner.login }} | |
| CMIP7_CVS_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| run: | | |
| which pip | |
| pip install -r requirements-cmor-cvs-table.txt | |
| pip install --no-deps "git+https://github.com/$ESGVOC_FORK/esgf-vocab.git@$ESGVOC_REVISION" | |
| esgvoc config create cmip7-cvs-ci-export | |
| esgvoc config switch cmip7-cvs-ci-export | |
| esgvoc config set "universe:github_repo=https://github.com/$UNIVERSE_CVS_FORK/WCRP-universe" "universe:branch=$UNIVERSE_CVS_BRANCH" | |
| esgvoc config add-project cmip7 --custom --repo "https://github.com/$CMIP7_CVS_FORK/CMIP7-CVs" --branch "$CMIP7_CVS_BRANCH" | |
| esgvoc config remove-project -f cmip6 | |
| esgvoc config remove-project -f cmip6plus | |
| esgvoc install | |
| - name: Update CMOR CVs table | |
| run: | | |
| esgvoc cmor-export-cvs-table --out-path cmor-cvs.json | |
| git diff |