Skip to content

Commit 63fa1c8

Browse files
committed
ci(repo): fetch snapi from pkg.pr.new and pin baseline to base.sha
clerk/snapi is private, so pnpm dlx --package "github:clerk/snapi#..." fails on Actions runners with no SSH key. Switch to the public pkg.pr.new tarball URL pinned to the latest snapi PR build. Also pin the worktree-fallback baseline to the immutable pull_request.base.sha instead of origin/<base-branch>; if the base branch advances during the run, this prevents drift between the cached baseline lookup key and what the worktree actually checks out.
1 parent 139285a commit 63fa1c8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/api-changes.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ concurrency:
3535
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3636

3737
env:
38-
SNAPI_PACKAGE: github:clerk/snapi#8c021a2796b313cdefa945a715df8f02e4f99867
38+
SNAPI_PACKAGE: https://pkg.pr.new/clerk/snapi/@clerk/snapi@5b897f1c8be7692b3914e7f11d2720e91e216b34
3939
SNAPI_FILTERS: >-
4040
--filter=@clerk/clerk-js
4141
--filter=@clerk/react
@@ -121,15 +121,15 @@ jobs:
121121
- name: Build current declarations
122122
run: pnpm turbo build:declarations $TURBO_ARGS $SNAPI_FILTERS
123123

124-
- name: Fetch base branch
124+
- name: Fetch base commit
125125
if: steps.baseline-cache.outputs.cache-matched-key == ''
126-
run: git fetch origin "${GITHUB_BASE_REF}:refs/remotes/origin/${GITHUB_BASE_REF}" --depth=100
126+
run: git fetch origin "${{ github.event.pull_request.base.sha }}" --depth=1
127127

128128
- name: Create baseline worktree
129129
if: steps.baseline-cache.outputs.cache-matched-key == ''
130130
run: |
131131
mkdir -p .worktrees
132-
git worktree add .worktrees/snapi-baseline "origin/${GITHUB_BASE_REF}"
132+
git worktree add --detach .worktrees/snapi-baseline "${{ github.event.pull_request.base.sha }}"
133133
cp snapi.config.json .worktrees/snapi-baseline/snapi.config.json
134134
135135
- name: Install baseline dependencies

0 commit comments

Comments
 (0)