source2rosetta/.forgejo/workflows/backfill.yml
Kamal Tufekcic a2922b8bad
All checks were successful
CI / fuzz (push) Successful in 1m41s
CI / lint (push) Successful in 16s
CI / test (push) Successful in 22s
initial commit
2026-07-27 10:12:04 +03:00

45 lines
1.2 KiB
YAML

name: backfill
on:
workflow_dispatch:
inputs:
game:
description: "Game key (cs2 or dota2)"
required: true
default: cs2
names:
description: 'Names JSON — array of {name, class, slot}'
required: true
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