forked from Ninjalama/streamyfin_mirror
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: 🔒 Lockfile Consistency Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [develop, master]
|
|
push:
|
|
branches: [develop, master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-lockfile:
|
|
name: 🔍 Check bun.lock and package.json consistency
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: 📥 Checkout repository
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
show-progress: false
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: 🍞 Setup Bun
|
|
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
|
|
with:
|
|
bun-version: '1.2.15'
|
|
|
|
- name: 💾 Cache Bun dependencies
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
with:
|
|
path: |
|
|
~/.bun/install/cache
|
|
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
|
|
|
|
- name: 🛡️ Verify lockfile consistency
|
|
run: |
|
|
set -euxo pipefail
|
|
echo "➡️ Checking for discrepancies between bun.lock and package.json..."
|
|
bun install --frozen-lockfile --dry-run --ignore-scripts
|
|
echo "✅ Lockfile is consistent with package.json!"
|