source2rosetta/.forgejo/workflows/backfill.yml
Kamal Tufekcic e056134fa6
All checks were successful
CI / lint (push) Successful in 16s
CI / fuzz (push) Successful in 1m39s
CI / test (push) Successful in 20s
add game options
2026-07-27 10:26:06 +03:00

50 lines
1.3 KiB
YAML

name: backfill
on:
workflow_dispatch:
inputs:
game:
description: "Game key"
required: true
default: cs2
type: choice
options:
- cs2
- dota2
names:
description: 'Names JSON — array of {name, class, slot}'
required: true
type: string
jobs:
backfill:
runs-on: s2-runner
env:
GAME: ${{ github.event.inputs.game }}
RELEASE_BASE: ${{ github.server_url }}/${{ github.repository }}/releases/download
steps:
- uses: actions/checkout@v6.0.2
- name: Fetch the model
run: |
mkdir -p in
curl -fsSL -o in/model-$GAME.json "$RELEASE_BASE/$GAME-latest/model-$GAME.json"
- name: Write the names file
run: printf '%s' "$NAMES" > names.json
env:
NAMES: ${{ github.event.inputs.names }}
- name: Build the deriver
run: cargo build --release
- name: Backfill
run: |
./target/release/source2rosetta --game "$GAME" backfill \
--corpus-model in/model-$GAME.json \
--names names.json \
--out history.json
- uses: actions/upload-artifact@v4
with:
name: backfill-${{ env.GAME }}
path: history.json