Skip to content

Add multiple Zenodo entries #24

Add multiple Zenodo entries

Add multiple Zenodo entries #24

name: Update DALIA CSV on Resource Change
on:
pull_request:
paths:
- 'resources/nfdi4bioimage.yml'
jobs:
update-dalia-csv:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v2
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Install dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install nbconvert transformers torch
sudo apt-get install -y poppler-utils
# Execute the Notebook to export CSV in DALIA format
- name: Execute Jupyter Notebook
run: |
jupyter nbconvert --execute --inplace scripts/Export_to_DALIA.ipynb
# Commit and push changes if any file was updated
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --staged --quiet || git commit -m "Auto-update CSV after modifying nfdi4bioimage.yml"
git pull --rebase origin ${{ github.head_ref }}
# Authenticate and push
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.head_ref }}