Skip to content

Fetch manifests

Fetch manifests #82269

Workflow file for this run

name: Fetch manifests
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
# “Every 30 minutes”
- cron: "*/30 * * * *"
jobs:
fetch:
name: Fetch
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
# use `npe2 fetch -all` to fetch all plugin manifests into the public/manifest folder
- name: fetch manifests
run: |
python -m pip install -U pip
python -m pip install git+https://github.com/napari/npe2.git
python -m pip install -r requirements.txt
# rm public/manifest/*.json
python -m npe2 fetch --all -o public/manifest
# validate and index manifests into easily searchable json files
- name: (re)index
run: |
python scripts/reindex.py
env:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
CODECOV_API_TOKEN: ${{ secrets.CODECOV_API_TOKEN }}
- name: validate output
run: pytest
# push changes back to the repo, this will trigger a new vercel build
# https://github.com/stefanzweifel/git-auto-commit-action
- uses: stefanzweifel/git-auto-commit-action@v4
if: github.event_name != 'pull_request'
with:
commit_message: '[bot] Update manifests'
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>