Skip to content

build: check if bundle actually changed #13

build: check if bundle actually changed

build: check if bundle actually changed #13

Workflow file for this run

name: Bundle Update
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
pull-requests: write
jobs:
bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Cache Node.js dependencies
uses: actions/cache@v3
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Bundle with Bun
run: bun run bundle
- name: Commit and push bundled files
run: |
git config --global user.email "[email protected]"
git config --global user.name "BeatForge CI"
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "chore: bundle update"
git push
else
echo "No changes detected"
fi