mirror of
https://github.com/seerr-team/seerr.git
synced 2026-06-02 13:20:22 -04:00
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Rebuild Issue Index
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
env:
|
|
EMBEDDING_MODEL: ${{ vars.EMBEDDING_MODEL }}
|
|
|
|
jobs:
|
|
build-index:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
issues: read
|
|
actions: write
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Pnpm Setup
|
|
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Get pnpm store directory
|
|
shell: bash
|
|
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- name: Setup pnpm cache
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
working-directory: bin/duplicate-detector
|
|
env:
|
|
CI: true
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build issue index
|
|
working-directory: bin/duplicate-detector
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
INDEX_PATH: issue_index.json
|
|
run: node build-index.mjs
|
|
|
|
- name: Upload index artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: issue-index
|
|
path: bin/duplicate-detector/issue_index.json
|
|
retention-days: 7
|