ci #39
This file contains 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: ci | |
on: | |
schedule: | |
- cron: '0 0 */2 * *' # run every 2 days at 12am | |
workflow_dispatch: | |
jobs: | |
generate-and-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Run games-gen | |
run: cd games-gen && cargo run | |
- name: Check for Changes | |
id: check_changes | |
run: | | |
git diff --exit-code --quiet || echo "Changes detected" && echo "::set-output name=changes::true" | |
- name: Create Pull Request | |
if: steps.check_changes.outputs.changes == 'true' | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.TOKEN }} | |
branch: generated-files | |
title: "Automated Update: Games" | |
body: "This PR updates the generated games.json" | |
labels: "auto-generated" | |
delete-branch: true | |