Skip to content

Run indexer

Run indexer #6375

Workflow file for this run

name: Run indexer
on:
schedule:
- cron: "15 */2 * * *"
workflow_dispatch:
env:
OUTPUT_PATH: ${{ github.workspace }}/output
APP_PATH: ${{ github.workspace }}/src/ScoopSearch.Indexer.Console/
GitHub__Token: ${{ secrets.GITHUB_TOKEN }}
DOTNET_VERSION: '8.0.x'
jobs:
main:
name: Build and run indexer ⚙️️🚀🌐
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Staging' }}
concurrency: ci-${{ github.ref }}-${{ vars.AZURESEARCH__SERVICEURL }}-${{ vars.AZURESEARCH__INDEXNAME }}
env:
AZURESEARCH__SERVICEURL: ${{ vars.AZURESEARCH__SERVICEURL }}
AZURESEARCH__INDEXNAME: ${{ vars.AZURESEARCH__INDEXNAME }}
AZURESEARCH__ADMINAPIKEY: ${{ secrets.AZURESEARCH__ADMINAPIKEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore ${{ env.APP_PATH }}
- name: Publish
run: >
dotnet publish ${{ env.APP_PATH }}
--configuration Release
--no-restore
--output ${{ env.OUTPUT_PATH }}
- name: Run indexer
run: |
cd ${{ env.OUTPUT_PATH }}
./ScoopSearch.Indexer.Console
- name: Upload logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: logs
path: ${{ env.OUTPUT_PATH }}/output.txt
keepalive:
name: Keepalive Workflow
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v4
- uses: gautamkrishnar/keepalive-workflow@v2