Skip to content

Run Indexer

Run Indexer #9160

Workflow file for this run

name: Run Indexer
on:
push:
branches: [ "main" ]
schedule:
- cron: '55 * * * *'
permissions:
contents: write
jobs:
run_indexer:
strategy:
matrix:
environment: [Development, Production]
branch: [main, release/v3]
indexer_type: [imap, psp]
exclude:
- indexer_type: psp
environment: Development
fail-fast: false
max-parallel: 1
runs-on: ubuntu-latest
environment: ${{matrix.environment}}
env:
IMAP_API_DOWNLOAD_URL: ${{vars.IMAP_API_DOWNLOAD_URL}}
IMAP_DATA_ACCESS_URL: ${{vars.DATA_ACCESS_URL}}
IMAP_API_KEY: ${{secrets.IMAP_API_KEY}}
INDEX_FILE_DESCRIPTOR: ${{vars.INDEX_FILE_DESCRIPTOR}}
steps:
- uses: actions/checkout@v4
with:
ref: ${{matrix.branch}}
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
python-version: "3.13"
- name: Run Index
run: |
uv run main.py ${{matrix.indexer_type}}
- name: Commit and Push
run: |
git pull
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git diff --cached --quiet || git commit -m "Automatically update ${{matrix.indexer_type}} index file"
git push