Repository navigation
Update data and opcode #5049
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |