Files
Peter Pistorius 417bd260b6 Rename Agent CI to Local CI and support private images (#385)
* Support private workflow container images

* Resolve private image expression contexts

* feat: rename Agent CI to Local CI
2026-08-06 22:52:39 +02:00

84 lines
3.1 KiB
YAML

name: "Smoke: actions/setup-node manifest fetch"
# Reproduces #249 — actions/setup-node@v5 printed "Bad credentials" and fell
# back to downloading Node directly from nodejs.org because @actions/tool-cache
# hardcodes https://api.github.com and escapes our DTU. This smoke creates a
# throwaway project, runs local-ci against a workflow that uses setup-node,
# and fails if the step logs the fallback path.
on:
pull_request_target:
types: [opened, labeled, synchronize]
jobs:
node-setup:
if: '!github.event.pull_request.draft && (contains(fromJSON(''["MEMBER", "OWNER", "COLLABORATOR"]''), github.event.pull_request.author_association) || contains(github.event.pull_request.labels.*.name, ''safe-to-run''))'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
with:
version: 10.30.1
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 22
cache: "pnpm"
- run: pnpm install
- name: Build local-ci
run: pnpm --filter run-local-ci... -r build
- name: Create temp node-setup project
run: |
mkdir -p /tmp/node-setup-repro/.github/workflows
cat > /tmp/node-setup-repro/package.json << 'PKG'
{ "name": "node-setup-repro", "private": true }
PKG
cat > /tmp/node-setup-repro/.github/workflows/test.yml << 'WF'
name: Test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24
package-manager-cache: false
- name: Verify node
run: |
node --version
corepack --version
WF
cd /tmp/node-setup-repro
git init
git remote add origin https://github.com/test-org/node-setup-repro.git
git add -A
git -c user.name="test" -c user.email="test@test.com" commit -m "init"
- name: Run local-ci against node-setup project
id: run
working-directory: /tmp/node-setup-repro
run: |
node "$GITHUB_WORKSPACE/packages/cli/dist/cli.js" \
run --workflow .github/workflows/test.yml --quiet 2>&1 | tee /tmp/node-setup.out
- name: Assert setup-node took the manifest path (no "Bad credentials")
run: |
if grep -q "Bad credentials" /tmp/node-setup.out; then
echo "::error::setup-node fell back to the nodejs.org path — the DTU manifest mock is broken."
grep -n "Bad credentials\|Falling back\|Acquiring" /tmp/node-setup.out || true
exit 1
fi
echo "OK: no 'Bad credentials' in setup-node output."