Skip to content

Update data and opcode #1279

Update data and opcode

Update data and opcode #1279

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:
- name: Checkout
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- run: poetry install
- 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: poetry run python scripts/update_opcode.py
- 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 instance data
run: poetry run python scripts/extract_instance.py
- name: Update job data
run: poetry run python scripts/extract_job.py
- name: Update roulette data
run: poetry run python scripts/extract_roulette.py
- 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 }}