Update Plugin Index #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Plugin Index | |
on: | |
workflow_dispatch: | |
schedule: | |
# "every 2 hours" | |
- cron: 0 */2 * * * | |
jobs: | |
fetch: | |
name: Fetch | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'write' | |
id-token: 'write' | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: auth | |
name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }} | |
# reindex requires conda to be setup | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
- name: Find packages by classifier | |
run: | | |
python -m pip install -U pip | |
python -m pip install -r requirements.txt | |
python scripts/find_by_classifier.py | |
# python -m pip install -r requirements.txt google-cloud-bigquery | |
# python scripts/bigquery.py | |
# fetch new manifests for new/updated plugins, based on active versions found with bigquery | |
- name: Fetch manifests | |
run: | | |
python scripts/fetch_manifests.py | |
# validate and re-index plugin versions in case new ones have been | |
# retrieved from bigquery | |
# will update extended_summary.json, index.json and pypi.json | |
# to include all plugin versions | |
- name: (re)index | |
run: | | |
python scripts/reindex.py | |
env: | |
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} | |
CODECOV_API_TOKEN: ${{ secrets.CODECOV_API_TOKEN }} | |
# 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 | |
with: | |
commit_message: '[bot] Update Plugin Index' | |
commit_author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |