Skip to content

Update data and opcode #5049

Update data and opcode

Update data and opcode #5049

Workflow file for this run

name: Update data and opcode
on:
schedule:
# At minute 0 past every 4th hour.
- cron: "0 */4 * * *"
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Python Environment
uses: ./.github/actions/setup-python
- name: Setup git user
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Update opcodes
run: uv run --no-sync scripts/update_opcode.py
shell: bash
- name: Commit opcode
id: opcode-commit
run: |
git add .
git diff-index --quiet HEAD || echo "DIFF=true" >> $GITHUB_OUTPUT
git diff-index --quiet HEAD || git commit -m "chore(opcode): update opcode"
- name: Update misc data
run: |
uv run --no-sync scripts/dump_instance.py
uv run --no-sync scripts/dump_job.py
uv run --no-sync scripts/dump_roulette.py
shell: bash
- name: Commit data
id: data-commit
run: |
git add .
git diff-index --quiet HEAD || echo "DIFF=true" >> $GITHUB_OUTPUT
git diff-index --quiet HEAD || git commit -m "chore(data): update data"
- name: Push commits
run: git push
- name: Trigger build
if: ${{ steps.opcode-commit.outputs.DIFF == 'true' || steps.data-commit.outputs.DIFF == 'true' }}
run: gh workflow run build.yml
env:
GH_TOKEN: ${{ github.token }}