Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync ERDDAP metadata from metadata form file repository #185

Closed
wants to merge 13 commits into from
52 changes: 52 additions & 0 deletions .github/workflows/sync-metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Sync ERDDAP metadata from metadata form file repository
on:
workflow_dispatch:

push:
branches:
- sync-metadata

jobs:
sync-metadata:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: datasets
- name: Checkout metadata
uses: actions/checkout@v4
with:
repository: HakaiInstitute/hakai-metadata-entry-form-files
path: metadata
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install git+https://github.com/HakaiInstitute/hakai-metadata-conversion.git@update-erddap-xml
working-directory: datasets

- name: Update ERDDAP metadata
run: |
hakai_metadata_conversion erddap-update \
--records 'metadata/**/*.yaml' \
--datasets-xml 'datasets/datasets.d/**/*.xml' \
--erddap-url https://catalogue.hakai.org/erddap

- name: Create a PR with the changes
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Sync ERDDAP metadata from metadata form file repository"
title: "Sync ERDDAP metadata from metadata form file repository"
body: "This PR was automatically created by the sync-metadata workflow."
branch: update-erddap-metadata
base: development
path: datasets
labels: sync-metadata
reviewers: hakaiinstitute/data-mobilization-team
assignees: hakaiinstitute/data-mobilization-team
draft: false
signoff: true
delete-branch: true
1 change: 1 addition & 0 deletions metadata_repo
Submodule metadata_repo added at 4baafb
Loading
Loading