forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1name: Lockfile
2
3on:
4 pull_request:
5concurrency:
6 group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
7 cancel-in-progress: true
8
9jobs:
10 verify-yarn-lock:
11 name: No manual yarn.lock edits
12 runs-on: ubuntu-latest
13 steps:
14 - name: Check out PR HEAD
15 uses: actions/checkout@v4
16 with:
17 fetch-depth: 0
18
19 - name: Fetch base branch
20 env:
21 BASE_REF: ${{ github.base_ref }}
22 run: git fetch origin $BASE_REF --depth=1
23
24 - name: Install node
25 uses: actions/setup-node@v6
26 with:
27 node-version-file: .nvmrc
28
29 - name: Reset yarn.lock to base
30 env:
31 BASE_REF: ${{ github.base_ref }}
32 run: git show "origin/$BASE_REF:yarn.lock" > yarn.lock
33
34 - name: Yarn install
35 uses: Wandalen/wretry.action@master
36 with:
37 # Fine to skip scripts since we don't run any code
38 command: yarn install --ignore-scripts
39 attempt_limit: 3
40 attempt_delay: 2000
41
42 - name: Verify yarn.lock
43 run: |
44 git diff --quiet --exit-code || {
45 echo '::error::`yarn.lock` does not match what Yarn would generate given the base `yarn.lock` and the head `package.json`.'
46 echo '::error:: - If this is intentional, you can ignore this check.'
47 echo '::error:: - If this is unintentional, apply the following diff:'
48 git --no-pager diff
49 exit 1
50 }