-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create validate-and-publish-wcmp2,yml
- Loading branch information
1 parent
298d02f
commit 1bf28e6
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Validate and publish WCMP2 discovery metadata2 | ||
|
||
env: | ||
CENTRE_ID: ca-eccc-msc | ||
PYWIS_PUBSUB_BROKER_URL: ${{ secrets.PYWIS_PUBSUB_BROKER_URL }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'gh-pages' | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- name: checkout gh-pages branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
- uses: actions/setup-python@v2 | ||
name: Setup Python ${{ matrix.python-version }} | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install requirements | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip3 install https://github.com/wmo-im/pywcmp/archive/master.zip | ||
pip3 install https://github.com/wmo-im/pywis-pubsub/archive/main.zip | ||
- name: Validate WCMP2 records | ||
run: | | ||
find . -type f -name "*.json" -exec pywcmp ets validate {} \; | ||
- name: Publish WNMs of WCMP2 records | ||
run: | | ||
find . -type f -name "*.json" -exec pywis-pubsub publish --topic origin/a/wis2/${CENTRE_ID}/metadata --config config/pywis-pubsub-publish.yml -u https://eccc-msc.github.io/msc-wis2node/{} -i `cat /proc/sys/kernel/random/uuid` -v DEBUG \; | ||
|