mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-14 17:05:28 +02:00
'Fix bun temp' x3, 'Restore deps' x5, 'Seed claude interactive config' x3, and 'Register gstack skills' x3 were byte-near-identical copies across the legacy matrix, the sliced lane, and the periodic lane — and only the MATRIX copy of register-skills carried the 19-line dangling-symlink + frontmatter fail-fast loop written after a silent 'Unknown command' + 35-min-timeout incident. Extract all four into .github/actions/ composites; the register composite carries the verification loop (generalized over the skill list), so the sliced and periodic lanes — the lanes that SURVIVE the matrix deletion — now inherit the check they had silently dropped. Matrix-job inline copies are left untouched: that job is deleted next. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
31 lines
1.3 KiB
YAML
31 lines
1.3 KiB
YAML
name: Seed claude interactive config
|
|
description: >
|
|
Seed ~/.claude.json with onboarding-complete plus the API-key approval so
|
|
PTY sessions never wedge on the fresh-container onboarding / "use detected
|
|
ANTHROPIC_API_KEY?" dialog. Mirrors what the hermetic E2E child env seeds.
|
|
Idempotent — safe to run unconditionally in sliced lanes where any slice
|
|
can host a PTY test. Only the key's last 20 chars are persisted (the
|
|
approval-hash form claude itself writes), never the whole key.
|
|
inputs:
|
|
anthropic-api-key:
|
|
description: API key whose suffix gets pre-approved. Pass from secrets at the call site.
|
|
required: false
|
|
default: ''
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- shell: bash
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
|
|
run: |
|
|
node -e '
|
|
const fs = require("fs"), os = require("os"), path = require("path");
|
|
const p = path.join(os.homedir(), ".claude.json");
|
|
const seed = fs.existsSync(p) ? JSON.parse(fs.readFileSync(p, "utf8")) : {};
|
|
seed.hasCompletedOnboarding = true;
|
|
const key = process.env.ANTHROPIC_API_KEY || "";
|
|
if (key) seed.customApiKeyResponses = { approved: [key.slice(-20)], rejected: [] };
|
|
fs.writeFileSync(p, JSON.stringify(seed, null, 2));
|
|
console.log("seeded", p);
|
|
'
|