Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/actions/prebuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ runs:
- name: Install deps for package
shell: bash
working-directory: ./package
run: npm install
# `--ignore-scripts`: the target module is untrusted third-party
# code. bare-make drives the native build from CMakeLists afterwards,
# so no install-time lifecycle script is needed (same as the
# better-sqlite3 workflow). Defence-in-depth alongside the caller
# checkout's `persist-credentials: false`.
run: npm install --ignore-scripts

- name: Install patched cmake-napi
shell: bash
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/prebuild-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,12 @@ jobs:
name: ${{ inputs.module_name }} (${{ matrix.platform }}-${{ matrix.arch }}${{ matrix.simulator && '-simulator' || '' }})
steps:
# Caller's repo — needed so `patches_dir` (a caller-relative path)
# resolves against the workspace root.
# resolves against the workspace root. `persist-credentials: false`
# keeps the caller's GITHUB_TOKEN off disk — see the comment in
# prebuild.yml.
- uses: actions/checkout@v6
with:
persist-credentials: false

# Same-ref harness checkout — see the comment in prebuild.yml.
- name: Checkout prebuild harness
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ jobs:
module_version: ${{ steps.prebuild.outputs.module_version }}
steps:
# Caller's repo — needed so `patches_dir` (a caller-relative path)
# resolves against the workspace root.
# resolves against the workspace root. `persist-credentials: false`
# keeps the caller's GITHUB_TOKEN out of $GITHUB_WORKSPACE/.git/config
# so the untrusted `npm install` of the target module (with lifecycle
# scripts) below can't read a (release-write-capable) token off disk.
- uses: actions/checkout@v6
with:
persist-credentials: false

# Check out this repo at the SAME ref this reusable workflow is
# running from (`job.workflow_sha` resolves the caller's @v2/@main/
Expand Down