Update Bundles #19
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 Bundles" | |
| on: | |
| schedule: | |
| - cron: "0 * * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| UpdateBundles: | |
| name: Update packwiz sources to latest stable | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v4 | |
| - name: Update bundles | |
| run: | | |
| chmod +x ./scripts/*.sh | |
| ./scripts/update-bundles.sh | |
| # Gate: if the freshly-updated versions break the dependency graph, fail here | |
| # instead of committing broken sources (which Deploy would then publish). | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: "pnpm" | |
| - name: Install node dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Cache mod jars | |
| uses: actions/cache@v4 | |
| with: | |
| path: scripts/.cache/jars | |
| key: mod-jars-${{ hashFiles('data/oneclient/bundles/.mrpacks/**/*.pw.toml') }} | |
| restore-keys: | | |
| mod-jars- | |
| - name: Check compatibility | |
| run: pnpm check:compat | |
| # Only the packwiz source (.mrpacks) is committed. Pushing to main triggers | |
| # the Deploy workflow, which regenerates the bundles and publishes to GitHub Pages. | |
| - name: Commit and push updated sources | |
| run: | | |
| git config --global user.name "Bundle Updater[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/oneclient/bundles/.mrpacks | |
| git commit -m "chore(update-bundles)" || echo "No changes to commit" | |
| git push |