-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (53 loc) · 1.8 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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: Run BigQuery
run: |
python -m pip install -U pip
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>