Skip to content

Auto-update check_datasets.js #490

Auto-update check_datasets.js

Auto-update check_datasets.js #490

name: Auto-update check_datasets.js
on:
workflow_dispatch:
schedule:
- cron: '18 3 * * *'
jobs:
check-catalogs:
name: Check catalogs and create check_datasets.js file
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: catalog-validation
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install Scivision
run: pip install -e .
- name: Check data catalog
run: scivision-check-datasets
- name: Store artifact
uses: actions/upload-artifact@v4
with:
name: check-datasets-report
path: check_datasets.js
- name: Update check_datasets.js in frontend repository
run: |
mv -f check_datasets.js frontend/src/consts/check_datasets.js
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git pull origin catalog-validation
git add .
git commit -m "auto-update via GH Action"
git push origin catalog-validation