Skip to content

.github/workflows/update-super-dataset.yml #172

.github/workflows/update-super-dataset.yml

.github/workflows/update-super-dataset.yml #172

name: Update Super-dataset
on:
schedule:
- cron: "0 23 * * *" # 6pm ET
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
_GITHUB_API_KEY: ${{ secrets._GITHUB_API_KEY }}
jobs:
UpdateSuperdataset:
runs-on: ubuntu-latest
steps:
- name: Clone repo
run: git clone https://x-access-token:${{ secrets._GITHUB_API_KEY }}@github.com/dandi/bids-dandisets.git
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install packages
run: pip install dandi requests
- name: Run update script
run: python bids-dandisets/.github/scripts/update_super_dataset.py
- name: Upload changes
run: |
cd bids-dandisets
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit --message "update" || true
git push
NotifyOnFailure:
runs-on: ubuntu-latest
needs: [ UpdateSuperdataset ]
if: ${{ always() && needs.UpdateSuperdataset.result == 'failure' }}
steps:
- uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: "CI Failure: Super-datset of BIDS-Dandisets Update"
to: cody.c.baker.phd@gmail.com # Add more with comma separation (no spaces)
from: bids-dandisets
body: "Please check the latest run of the Super-dataset of BIDS-Dandisets generation: https://github.com/dandi/bids-dandisets/actions/workflows/update-super-dataset.yml"