@theholocron/astromech 5.1.3 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -6
- package/dist/index.mjs +96 -112
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -359,16 +359,10 @@ function requiredChecksVerdict(input) {
|
|
|
359
359
|
* uses it as it is.
|
|
360
360
|
*/
|
|
361
361
|
const DEFAULT_ORG = "theholocron";
|
|
362
|
-
/** The `owner/repo` of the org's `.github` repo, which
|
|
362
|
+
/** The `owner/repo` of the org's `.github` repo, which holds the frozen reusable workflows (and Sentinel's dispatch target). */
|
|
363
363
|
const DOT_GITHUB_REPO = `${DEFAULT_ORG}/.github`;
|
|
364
364
|
/** The `owner/repo` of this monorepo, where the CLI, the reusables' sources and the Trusted Publisher config live. */
|
|
365
365
|
const HOLOCRON_REPO = `${DEFAULT_ORG}/holocron`;
|
|
366
|
-
/** How the templates spell a reference. Never emitted as it is, and never to be changed: {@link rehome} reads it. */
|
|
367
|
-
const TEMPLATE_HOME = {
|
|
368
|
-
workflows: `${DOT_GITHUB_REPO}/.github/workflows`,
|
|
369
|
-
actions: `${DOT_GITHUB_REPO}/.github/actions`,
|
|
370
|
-
ref: "main"
|
|
371
|
-
};
|
|
372
366
|
/**
|
|
373
367
|
* Where the hosted files live and the tag generated callers pin them to: `theholocron/holocron` at `ci-v1`, the tag the
|
|
374
368
|
* first release of the `ci` group makes on the promoted `main`. Only flat names, and `ci.yml`, exist there. The repo
|
|
@@ -380,20 +374,10 @@ const CI_TARGET = {
|
|
|
380
374
|
ref: "ci-v1"
|
|
381
375
|
};
|
|
382
376
|
/**
|
|
383
|
-
* Where generated workflows call the hosted files: {@link CI_TARGET}. It was
|
|
384
|
-
*
|
|
385
|
-
* change to this constant alone (spec `tech-workflows-in-holocron`, issue #1474).
|
|
377
|
+
* Where generated workflows call the hosted files: {@link CI_TARGET}. It was the frozen copies in `theholocron/.github`
|
|
378
|
+
* at `main` until the tag existed (spec `ci-flat-task-vocabulary`, phase K).
|
|
386
379
|
*/
|
|
387
380
|
const CI_HOME = { ...CI_TARGET };
|
|
388
|
-
const REFERENCE = /theholocron\/\.github\/\.github\/(workflows|actions)\/([\w.-]+)@main/g;
|
|
389
|
-
/** `text` with every hosted-workflow and hosted-action reference moved from the templates' spelling to `home`. */
|
|
390
|
-
function rehome(text, home = CI_HOME) {
|
|
391
|
-
return text.replace(REFERENCE, (_all, kind, name) => `${home[kind]}/${name}@${home.ref}`);
|
|
392
|
-
}
|
|
393
|
-
/** {@link rehome} applied to every value of a map of templates. */
|
|
394
|
-
function rehomeAll(templates, home = CI_HOME) {
|
|
395
|
-
return Object.fromEntries(Object.entries(templates).map(([name, text]) => [name, rehome(text, home)]));
|
|
396
|
-
}
|
|
397
381
|
/**
|
|
398
382
|
* A `uses:` value for a hosted reusable workflow, for generated YAML that is not written in a template. `file` is the
|
|
399
383
|
* flat name (`deploy.yml`).
|
|
@@ -526,63 +510,63 @@ function describeTasks() {
|
|
|
526
510
|
return lines.join("\n");
|
|
527
511
|
}
|
|
528
512
|
// ../../ci/dist/index.mjs
|
|
529
|
-
var annotate_default$1 = "name: Review\n\n# ReviewDog is the annotation layer — posts inline PR diff annotations.\n# Runs on pull_request only: inline annotations require PR context,\n# and branch protection ensures all changes go through PRs anyway.\n# scan-secrets.yml / lint-data.yml\n# are the CI gates covering push + PR events. Gitleaks and YAML are\n# intentionally duplicated: those gate merges; ReviewDog surfaces exact\n# line annotations in the PR diff.\n#\n# Inclusive language (alex) is not run here: Sentinel owns that check (`lint:language / Run alex`), reading the org's own\n# allow-list (`process-sentinel-and-actions-roles`, #2263, #831).\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n reviewdog:\n name: Post inline lint annotations\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: read\n pull-requests: write\n\n steps:\n - name: Checkout repository\n uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n fetch-depth: 0\n\n - name: Setup\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n uses: theholocron
|
|
530
|
-
var build_default$1 = "name: Build\n\n# Sanity check that every workspace actually compiles to dist/ — doesn't\n# upload or publish anything. delivery.publish builds again before\n# publishing; this just answers \"does it build?\" on every push/PR.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n build:\n name: Build every workspace\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron
|
|
531
|
-
var check_notify_default$1 = "name: Notify Check\n\n# Proves the notification path end to end, from a real run: that each channel's\n# webhook secret exists, that its webhook accepts a post, and that the alert\n# role ping resolves. It posts one clearly labelled test message per channel and\n# fails the matching job when any step does not work, so a red job names the\n# channel to fix. Manual (workflow_dispatch) only: it posts real messages.\n#\n# Each channel names its own webhook secret, because `setup notifications` lets a\n# layout override the default name (and normalises punctuation), so deriving the\n# name from the channel would miss those. A channel with `\"mention\": true` also\n# requires the role-id secret and pings it: a webhook accepting the post proves\n# the channel works, not that the role ping does, so a missing or malformed role\n# id fails that job instead of passing quietly. Whether Discord lets that role be\n# mentioned at all is checked by `holocron doctor notifications`, not here.\n#\n# The default list is every channel a workflow or the bot writes to through a\n# webhook: alerts, errors, uptime, releases, deploys and sync, plus rules and\n# welcome, the two read-only START HERE channels. Three channels are left out on\n# purpose. `ideas` is a forum: `holocron sync specs` writes its posts\n# through the bot token (HOLOCRON_DISCORD_BOT_TOKEN), and a forum has no webhook\n# post to prove. `holonet` is the doctor's own test channel, written by\n# `holocron doctor notifications`, never by a workflow. `dev` is for people\n# talking, and nothing posts there.\n#\n# Secrets reach this workflow through `secrets: inherit`, so any secret named in\n# `channels` is readable; the declared list below is for callers that pass secrets\n# explicitly.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n channels:\n description: >\n JSON array of channels to check, each `{ \"name\", \"secret\", \"mention\" }`:\n `secret` is the org secret holding that channel's webhook URL and\n `mention: true` also requires and pings the role in\n HOLOCRON_NOTIFY_ALERT_ROLE.\n type: string\n required: false\n default: >-\n [{\"name\":\"sync\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_SYNC\"},\n {\"name\":\"alerts\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ALERTS\",\"mention\":true},\n {\"name\":\"errors\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ERRORS\"},\n {\"name\":\"uptime\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_UPTIME\"},\n {\"name\":\"releases\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RELEASES\"},\n {\"name\":\"deploys\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS\"},\n {\"name\":\"rules\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RULES\"},\n {\"name\":\"welcome\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_WELCOME\"}]\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: Webhook for the sync channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: Webhook for the alerts channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ERRORS:\n description: Webhook for the errors channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_UPTIME:\n description: Webhook for the uptime channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: Webhook for the releases channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS:\n description: Webhook for the deploys channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RULES:\n description: Webhook for the rules channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_WELCOME:\n description: Webhook for the welcome channel.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: Id of the role to mention on the alerts channel's test message. Optional.\n required: false\n\njobs:\n check:\n name: Check ${{ matrix.channel.name }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n strategy:\n # One channel failing must not hide the others: the point is the full picture.\n fail-fast: false\n matrix:\n channel: ${{ fromJSON(inputs.channels) }}\n steps:\n - name: Require the alert role id\n if: matrix.channel.mention\n run: |\n if [ -z \"$ROLE\" ]; then\n echo \"::error::HOLOCRON_NOTIFY_ALERT_ROLE is not set, so the ping on #$CHANNEL cannot be checked.\"\n exit 1\n fi\n env:\n ROLE: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n CHANNEL: ${{ matrix.channel.name }}\n\n - uses: theholocron
|
|
532
|
-
var check_preview_default$1 = "name: Preview Check\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n preview-url:\n description: The PR's Vercel preview deployment URL, extracted from the triggering `deployment_status` event.\n required: true\n type: string\n sha:\n description: The deployed commit SHA — checked out explicitly, since GitHub evaluates which version of this workflow file to run from the default branch for a deployment_status event (unlike push/pull_request), and actions/checkout defaults to that same ref absent an explicit override.\n required: true\n type: string\n cwd:\n description: Directory to run the check from — the opted-in package's own directory in a monorepo. Defaults to the repo root.\n required: false\n type: string\n default: \".\"\n vercel-project:\n description: >\n Expected Vercel project id/name the preview URL must resolve\n to (verified live via Vercel's API) before\n VERCEL_PROTECTION_BYPASS_SECRET is ever attached to a request\n (holocron#1032 review) — a bare *.vercel.app hostname proves\n nothing on its own, since anyone can register their own\n Vercel project. Omitted → the bypass secret is never\n attached, regardless of whether it's configured.\n required: false\n type: string\n default: \"\"\n secrets:\n VERCEL_TOKEN:\n description: >\n Required alongside vercel-project to verify deployment\n ownership via Vercel's API (read-only use here). Not required\n when vercel-project is omitted.\n required: false\n VERCEL_PROTECTION_BYPASS_SECRET:\n description: >\n Vercel's \"Protection Bypass for Automation\" secret for the\n target project (holocron#1030) — sent as the\n x-vercel-protection-bypass header so this check's request\n isn't redirected to Vercel's own SSO login by Deployment\n Protection, which is on by default for Preview deployments.\n Optional: a check against a URL with protection disabled (or\n a provider other than Vercel) needs nothing here.\n required: false\n\njobs:\n preview-check:\n name: Run monitoring checks against the preview deployment\n permissions:\n contents: read\n # Both read-only, needed by the \"Resolve author trust\" step\n # below: pull-requests to find which PR `inputs.sha` belongs to,\n # and the collaborators/permission lookup (Metadata: read on a\n # PAT, already covered by contents) that step makes against the\n # real PR author.\n pull-requests: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Validate the preview URL\n id: validate\n env:\n CANDIDATE: ${{ inputs.preview-url }}\n run: |\n # `preview-url` comes from the triggering deployment_status\n # event's environment_url -- set by whoever created that\n # deployment status, not necessarily this repo's own\n # delivery.previewDeploy job (anyone with `deployments: write`\n # could create one directly via the API). Validated here,\n # independently of the event's origin, before this runner\n # ever issues an HTTP request to it (the monitoring check\n # below): without this, a crafted environment_url could point\n # the runner at an internal or attacker-controlled host\n # (SSRF) instead of a real Vercel preview. Forwarding the\n # re-serialized `url.href` rather than the raw input also\n # closes off argument injection through embedded whitespace\n # or shell metacharacters -- a string that parses can't carry\n # either.\n host=$(node -e 'try { process.stdout.write(new URL(process.argv[1]).hostname) } catch { process.exit(1) }' \"$CANDIDATE\") || host=\"\"\n if [[ \"$host\" != *.vercel.app ]]; then\n echo \"::error::preview-url '$CANDIDATE' does not parse to a *.vercel.app host (parsed host: '${host:-<unparseable>}')\"\n exit 1\n fi\n url=$(node -e 'const u = new URL(process.argv[1]); if (u.protocol !== \"https:\") process.exit(1); process.stdout.write(u.href)' \"$CANDIDATE\") || {\n echo \"::error::preview-url '$CANDIDATE' did not parse to an https:// URL\"\n exit 1\n }\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n ref: ${{ inputs.sha }}\n # This checks out and runs a PR's own holocron.config.ts —\n # untrusted until reviewed. Never leave a credential sitting\n # in .git/config for that code to read and exfiltrate; no\n # later step in this job needs to push or pull authenticated.\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Resolve author trust\n id: trust\n env:\n # Ambient, always-available -- no new secret. Only used for\n # two read-only lookups, both within what this token already\n # has by default.\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n SHA: ${{ inputs.sha }}\n run: |\n # Deliberately NOT a value carried in through the\n # deployment's own `payload` field (sourcery review on\n # #1058's first attempt): that field is attacker-controlled\n # by anyone with `deployments: write` -- same precondition\n # already needed to create a deployment_status event at all\n # -- so trusting whatever it claims would let that same\n # attacker forge payload.collaborator_permission = \"admin\"\n # on their own crafted deployment and unlock the bypass\n # secret regardless of who actually authored the code. This\n # step derives trust itself, from data it verifies\n # independently: which real PR `inputs.sha` belongs to, and\n # that PR's real author's current push-access level -- an\n # attacker can't forge either without already having\n # genuine write access to this repo.\n #\n # First attempt used\n # github.event.pull_request.author_association instead, and\n # separately turned out to be wrong for a different reason:\n # that field only reports MEMBER for a *publicly visible* org\n # membership, so a maintainer with private org membership\n # reads as CONTRIBUTOR and would wrongly fail-closed on their\n # own PRs (confirmed live on this exact repo, holocron#1057\n # follow-up). This lookup has neither problem: it reflects\n # real access -- direct collaborator, team membership, or\n # org default -- independent of any profile visibility\n # setting, and needs only \"Pull requests: read\" plus the\n # baseline \"Metadata: read\" every token already has.\n #\n # No PR found for this SHA, or no login on it -> \"none\" ->\n # untrusted. admin/maintain/write are the three roles GitHub\n # itself treats as push-capable. Missing or unrecognized ->\n # untrusted (fail-closed): an absent credential is safer\n # than a wrongly granted one.\n author=$(gh api \"repos/${GITHUB_REPOSITORY}/commits/${SHA}/pulls\" --jq '(.[0] // {}) | .user.login // empty' 2>/dev/null) || author=\"\"\n permission=\"none\"\n if [ -n \"$author\" ]; then\n permission=$(gh api \"repos/${GITHUB_REPOSITORY}/collaborators/${author}/permission\" --jq '.permission // \"none\"' 2>/dev/null) || permission=\"none\"\n fi\n case \"$permission\" in\n admin | maintain | write) trusted=true ;;\n *) trusted=false ;;\n esac\n echo \"trusted=$trusted\" >> \"$GITHUB_OUTPUT\"\n\n - name: Resolve monitoring checks\n id: resolve\n # Untrusted: loads and runs a PR's own holocron.config.ts, same\n # as the checkout above. No secrets in this step's env at all\n # (holocron#1032 review) -- VERCEL_TOKEN and\n # VERCEL_PROTECTION_BYPASS_SECRET live only on the step below,\n # which never loads this repo's config and so never runs a\n # single line of PR-authored code.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: resolve checks\n args: --cwd=${{ inputs.cwd }} --out=${{ runner.temp }}/monitoring-checks.json\n\n - name: Verify project and run monitoring checks\n env:\n # Read directly by `check resolved`\n # (cli/cli/src/cli/cli.ts) -- not part of the CLI's own\n # `--token`-resolution chain, since neither is a vendor API\n # credential this command calls anything with: VERCEL_TOKEN\n # only verifies, read-only, that the preview URL resolves to\n # vercel-project before VERCEL_PROTECTION_BYPASS_SECRET (a\n # plain header forwarded as-is) is ever attached. The command\n # itself never attaches the bypass header when vercel-project\n # is empty, regardless of whether these secrets are\n # configured -- never attached to an unverified URL.\n #\n # Both gated on `steps.trust.outputs.trusted` (holocron#1057):\n # confirmed live that Vercel forwards this header straight\n # through to the deployed function, so an untrusted PR's own\n # code could read and exfiltrate it off its own incoming\n # request. An untrusted deployment gets neither secret.\n HOLOCRON_VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n HOLOCRON_VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # The bare names stay until every caller's CLI reads the prefixed ones (#1864); a CLI that predates them\n # reads only these. The secrets arrive under the bare names here: the caller (`ci.check-preview.yml`) maps `secrets.HOLOCRON_X || secrets.X` onto them, since this workflow is also called with the bare names by repos on the frozen copy.\n VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # Not a secret and not gated on trust: the org's Vercel team id\n # (the synced org variable HOLOCRON_VERCEL_TEAM_ID, `repo.variables.sync`; the bare VERCEL_TEAM_ID until it is renamed),\n # which scopes the ownership lookup to the right team. It is\n # read from the org's settings, never from the PR's config\n # (`check resolved` loads none), so a PR cannot change it.\n HOLOCRON_VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: check resolved\n # vercel-project is NOT gated on trust (sourcery review on\n # #1058's first attempt) -- it isn't a secret, and clearing\n # it for an untrusted deployment would make\n # resolveVercelBypassHeaders treat \"no project given\" as\n # trivially verified (its early-return for an omitted\n # project), skipping ownership verification entirely rather\n # than failing. Always passing the real project here means\n # an untrusted deployment instead hits the \"project given\n # but no token\" branch -- VERCEL_TOKEN is empty above --\n # which fails the check outright, before ever issuing the\n # request, rather than letting an unverified host's response\n # (e.g. a 3xx redirect a status-less assertion wouldn't\n # catch) report green.\n args: --checks-file=${{ runner.temp }}/monitoring-checks.json --vercel-project=${{ inputs.vercel-project }} ${{ steps.validate.outputs.url }}\n";
|
|
533
|
-
var check_tokens_default$1 = "name: Token Expiry\n\n# Runs `holocron doctor secrets --verify` on a schedule, so a token that has been rejected or is about to expire (7 days or\n# fewer left) fails this job and GitHub's failed-workflow notification reaches the team before an operation breaks.\n#\n# Daily, not weekly: the warning window is 7 days, so a weekly run could land just outside it and the next one just\n# after the token lapsed. A daily run fails every day inside the window, which keeps the reminder in view until the\n# token is renewed.\n#\n# A token that is not set is skipped, not a failure, so a repo passes only the secrets it uses. Secrets reach the\n# job through `secrets: inherit`; the declared list below is for callers that pass them explicitly.\n#\n# The run also reads the repo's 1Password credentials provider (`<org/repo> - ci`), so it installs `op` and signs in with\n# `HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`, a read-only service account for that one Environment. Without it the `1password`\n# rows fail and the job is red every day, which hides a real expiry.\n#\n# It reads the `ci` layer only (`--env ci`): the service account sees that one Environment, and without the flag the\n# run also asks for `local` and `dev`, which it cannot read and so reports as missing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_READ_TOKEN:\n description: Fine-grained token for reading repos and Actions runs.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained token for issues.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Fine-grained token for `sync github`.\n required: false\n HOLOCRON_RELEASE_TOKEN:\n description: Fine-grained token for releases.\n required: false\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained token for repo settings.\n required: false\n HOLOCRON_SECRETS_TOKEN:\n description: Fine-grained organization token for organization secrets.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained token for GitHub Pages.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Fine-grained organization token for teams and organization variables.\n required: false\n HOLOCRON_USER_SYNC_TOKEN:\n description: Fine-grained token for the account links files.\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A read-only 1Password service account for the `ci` layer Environment, so the run can compare it with GitHub.\n required: false\n HOLOCRON_HEARTBEAT_CHECK_TOKENS:\n description: The ping URL of the `check-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n token-expiry:\n name: Run holocron doctor secrets --verify\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n HOLOCRON_RELEASE_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN }}\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_SECRETS_TOKEN: ${{ secrets.HOLOCRON_SECRETS_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_USER_SYNC_TOKEN: ${{ secrets.HOLOCRON_USER_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
513
|
+
var annotate_default$1 = "name: Review\n\n# ReviewDog is the annotation layer — posts inline PR diff annotations.\n# Runs on pull_request only: inline annotations require PR context,\n# and branch protection ensures all changes go through PRs anyway.\n# scan-secrets.yml / lint-data.yml\n# are the CI gates covering push + PR events. Gitleaks and YAML are\n# intentionally duplicated: those gate merges; ReviewDog surfaces exact\n# line annotations in the PR diff.\n#\n# Inclusive language (alex) is not run here: Sentinel owns that check (`lint:language / Run alex`), reading the org's own\n# allow-list (`process-sentinel-and-actions-roles`, #2263, #831).\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n reviewdog:\n name: Post inline lint annotations\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: read\n pull-requests: write\n\n steps:\n - name: Checkout repository\n uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n fetch-depth: 0\n\n - name: Setup\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n uses: theholocron/holocron/ci/actions/setup@ci-v1\n\n - name: Install ReviewDog\n uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1\n with:\n reviewdog_version: latest\n\n # Detect which tools are relevant for this repo, excluding node_modules.\n # hashFiles('**/*') recurses into node_modules/.pnpm and produces false\n # positives for repos that don't own those file types.\n # -print -quit stops find after the first match without a pipe, avoiding\n # the SIGPIPE/pipefail exit-141 that find|head-1 triggers under\n # GitHub Actions' default bash --noprofile --norc -e -o pipefail mode.\n - name: Detect project features\n id: detect\n shell: bash\n run: |\n has() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n has_ext() { find . -not -path '*/node_modules/*' -name \"$1\" -print -quit 2>/dev/null | grep -q .; }\n { { has 'eslint.config.js' || has 'eslint.config.mjs' || has 'eslint.config.cjs' || \\\n has 'eslint.config.ts' || has '.eslintrc' || has '.eslintrc.js' || \\\n has '.eslintrc.cjs' || has '.eslintrc.json' || has '.eslintrc.yaml' || \\\n has '.eslintrc.yml'; } && grep -qF '\"eslint\":' package.json 2>/dev/null; } && echo \"eslint=true\" >> \"$GITHUB_OUTPUT\" || echo \"eslint=false\" >> \"$GITHUB_OUTPUT\"\n { has 'tsconfig.json' && grep -qF '\"typescript\":' package.json 2>/dev/null; } && echo \"tsconfig=true\" >> \"$GITHUB_OUTPUT\" || echo \"tsconfig=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '*.sh' && echo \"shell=true\" >> \"$GITHUB_OUTPUT\" || echo \"shell=false\" >> \"$GITHUB_OUTPUT\"\n has 'Dockerfile' || has_ext '*.Dockerfile' || has 'Containerfile' && \\\n echo \"docker=true\" >> \"$GITHUB_OUTPUT\" || echo \"docker=false\" >> \"$GITHUB_OUTPUT\"\n has_ext '.env*' && echo \"dotenv=true\" >> \"$GITHUB_OUTPUT\" || echo \"dotenv=false\" >> \"$GITHUB_OUTPUT\"\n\n #\n # Always applicable\n #\n\n - name: Gitleaks (secrets)\n uses: reviewdog/action-gitleaks@2b7b5685e3e3eecddab5d30cfa04f18123031421 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / gitleaks\"\n fail_level: error\n gitleaks_flags: --log-opts=${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}\n\n - name: YamlLint\n if: ${{ hashFiles('.yamllint.yml') != '' }}\n uses: reviewdog/action-yamllint@020fba38ce9fed550c704d933aeeb7d6360f7d47 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / yamllint\"\n fail_level: error\n yamllint_flags: -c ${{ github.workspace }}/.yamllint.yml ${{ github.workspace }}\n\n - name: ActionLint (GitHub Actions)\n if: ${{ hashFiles('.github/workflows/*.yml', '.github/workflows/*.yaml') != '' }}\n uses: reviewdog/action-actionlint@ae857e78c1b42b3d0a49637181b09d3d56d402b4 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / actionlint\"\n fail_level: error\n\n #\n # TypeScript / JavaScript\n #\n\n - name: ESLint\n if: steps.detect.outputs.eslint == 'true'\n uses: reviewdog/action-eslint@6dad10dc50476699ad1ddbbb19bf55d36f311a39 # v1.37.0\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / eslint\"\n fail_level: error\n eslint_flags: .\n\n - name: TypeScript\n if: steps.detect.outputs.tsconfig == 'true'\n uses: EPMatt/reviewdog-action-tsc@63d923a3c5b4497671940b8874f58a404e2351b5 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / tsc\"\n fail_level: error\n\n #\n # Shell\n #\n\n - name: ShellCheck\n if: steps.detect.outputs.shell == 'true'\n uses: reviewdog/action-shellcheck@950c9d71535c8c49e5c029c33a438ade63b9009c # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / shellcheck\"\n fail_level: none\n\n #\n # Docker\n #\n\n - name: Hadolint\n if: steps.detect.outputs.docker == 'true'\n uses: reviewdog/action-hadolint@a3bc84c51f4ddbcbc5b91d950d0b66c15c88b113 # v1\n with:\n reporter: github-pr-annotations\n tool_name: \"Review / hadolint\"\n fail_level: none\n\n #\n # Environment files\n #\n\n - name: dotenv-linter\n if: steps.detect.outputs.dotenv == 'true'\n uses: dotenv-linter/action-dotenv-linter@afde61cfda2ecffe7bea35837b6f20b956c88689 # v3.0.0\n with:\n reporter: github-code-suggestions\n";
|
|
514
|
+
var build_default$1 = "name: Build\n\n# Sanity check that every workspace actually compiles to dist/ — doesn't\n# upload or publish anything. delivery.publish builds again before\n# publishing; this just answers \"does it build?\" on every push/PR.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n build:\n name: Build every workspace\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Build\n with:\n task: build\n affected: ${{ inputs.affected }}\n";
|
|
515
|
+
var check_notify_default$1 = "name: Notify Check\n\n# Proves the notification path end to end, from a real run: that each channel's\n# webhook secret exists, that its webhook accepts a post, and that the alert\n# role ping resolves. It posts one clearly labelled test message per channel and\n# fails the matching job when any step does not work, so a red job names the\n# channel to fix. Manual (workflow_dispatch) only: it posts real messages.\n#\n# Each channel names its own webhook secret, because `setup notifications` lets a\n# layout override the default name (and normalises punctuation), so deriving the\n# name from the channel would miss those. A channel with `\"mention\": true` also\n# requires the role-id secret and pings it: a webhook accepting the post proves\n# the channel works, not that the role ping does, so a missing or malformed role\n# id fails that job instead of passing quietly. Whether Discord lets that role be\n# mentioned at all is checked by `holocron doctor notifications`, not here.\n#\n# The default list is every channel a workflow or the bot writes to through a\n# webhook: alerts, errors, uptime, releases, deploys and sync, plus rules and\n# welcome, the two read-only START HERE channels. Three channels are left out on\n# purpose. `ideas` is a forum: `holocron sync specs` writes its posts\n# through the bot token (HOLOCRON_DISCORD_BOT_TOKEN), and a forum has no webhook\n# post to prove. `holonet` is the doctor's own test channel, written by\n# `holocron doctor notifications`, never by a workflow. `dev` is for people\n# talking, and nothing posts there.\n#\n# Secrets reach this workflow through `secrets: inherit`, so any secret named in\n# `channels` is readable; the declared list below is for callers that pass secrets\n# explicitly.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n channels:\n description: >\n JSON array of channels to check, each `{ \"name\", \"secret\", \"mention\" }`:\n `secret` is the org secret holding that channel's webhook URL and\n `mention: true` also requires and pings the role in\n HOLOCRON_NOTIFY_ALERT_ROLE.\n type: string\n required: false\n default: >-\n [{\"name\":\"sync\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_SYNC\"},\n {\"name\":\"alerts\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ALERTS\",\"mention\":true},\n {\"name\":\"errors\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_ERRORS\"},\n {\"name\":\"uptime\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_UPTIME\"},\n {\"name\":\"releases\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RELEASES\"},\n {\"name\":\"deploys\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS\"},\n {\"name\":\"rules\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_RULES\"},\n {\"name\":\"welcome\",\"secret\":\"HOLOCRON_NOTIFY_WEBHOOK_WELCOME\"}]\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: Webhook for the sync channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: Webhook for the alerts channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ERRORS:\n description: Webhook for the errors channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_UPTIME:\n description: Webhook for the uptime channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: Webhook for the releases channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_DEPLOYS:\n description: Webhook for the deploys channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RULES:\n description: Webhook for the rules channel.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_WELCOME:\n description: Webhook for the welcome channel.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: Id of the role to mention on the alerts channel's test message. Optional.\n required: false\n\njobs:\n check:\n name: Check ${{ matrix.channel.name }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n strategy:\n # One channel failing must not hide the others: the point is the full picture.\n fail-fast: false\n matrix:\n channel: ${{ fromJSON(inputs.channels) }}\n steps:\n - name: Require the alert role id\n if: matrix.channel.mention\n run: |\n if [ -z \"$ROLE\" ]; then\n echo \"::error::HOLOCRON_NOTIFY_ALERT_ROLE is not set, so the ping on #$CHANNEL cannot be checked.\"\n exit 1\n fi\n env:\n ROLE: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n CHANNEL: ${{ matrix.channel.name }}\n\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: Post a test message to ${{ matrix.channel.name }}\n with:\n strict: \"true\"\n webhook: ${{ secrets[matrix.channel.secret] }}\n # Only a channel marked `mention` pings, and strict mode rejects a malformed id.\n mention: ${{ matrix.channel.mention && secrets.HOLOCRON_NOTIFY_ALERT_ROLE || '' }}\n message: \"🧪 notify check — #${{ matrix.channel.name }} is wired up (${{ github.repository }}, <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>)\"\n";
|
|
516
|
+
var check_preview_default$1 = "name: Preview Check\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n preview-url:\n description: The PR's Vercel preview deployment URL, extracted from the triggering `deployment_status` event.\n required: true\n type: string\n sha:\n description: The deployed commit SHA — checked out explicitly, since GitHub evaluates which version of this workflow file to run from the default branch for a deployment_status event (unlike push/pull_request), and actions/checkout defaults to that same ref absent an explicit override.\n required: true\n type: string\n cwd:\n description: Directory to run the check from — the opted-in package's own directory in a monorepo. Defaults to the repo root.\n required: false\n type: string\n default: \".\"\n vercel-project:\n description: >\n Expected Vercel project id/name the preview URL must resolve\n to (verified live via Vercel's API) before\n VERCEL_PROTECTION_BYPASS_SECRET is ever attached to a request\n (holocron#1032 review) — a bare *.vercel.app hostname proves\n nothing on its own, since anyone can register their own\n Vercel project. Omitted → the bypass secret is never\n attached, regardless of whether it's configured.\n required: false\n type: string\n default: \"\"\n secrets:\n VERCEL_TOKEN:\n description: >\n Required alongside vercel-project to verify deployment\n ownership via Vercel's API (read-only use here). Not required\n when vercel-project is omitted.\n required: false\n VERCEL_PROTECTION_BYPASS_SECRET:\n description: >\n Vercel's \"Protection Bypass for Automation\" secret for the\n target project (holocron#1030) — sent as the\n x-vercel-protection-bypass header so this check's request\n isn't redirected to Vercel's own SSO login by Deployment\n Protection, which is on by default for Preview deployments.\n Optional: a check against a URL with protection disabled (or\n a provider other than Vercel) needs nothing here.\n required: false\n\njobs:\n preview-check:\n name: Run monitoring checks against the preview deployment\n permissions:\n contents: read\n # Both read-only, needed by the \"Resolve author trust\" step\n # below: pull-requests to find which PR `inputs.sha` belongs to,\n # and the collaborators/permission lookup (Metadata: read on a\n # PAT, already covered by contents) that step makes against the\n # real PR author.\n pull-requests: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Validate the preview URL\n id: validate\n env:\n CANDIDATE: ${{ inputs.preview-url }}\n run: |\n # `preview-url` comes from the triggering deployment_status\n # event's environment_url -- set by whoever created that\n # deployment status, not necessarily this repo's own\n # delivery.previewDeploy job (anyone with `deployments: write`\n # could create one directly via the API). Validated here,\n # independently of the event's origin, before this runner\n # ever issues an HTTP request to it (the monitoring check\n # below): without this, a crafted environment_url could point\n # the runner at an internal or attacker-controlled host\n # (SSRF) instead of a real Vercel preview. Forwarding the\n # re-serialized `url.href` rather than the raw input also\n # closes off argument injection through embedded whitespace\n # or shell metacharacters -- a string that parses can't carry\n # either.\n host=$(node -e 'try { process.stdout.write(new URL(process.argv[1]).hostname) } catch { process.exit(1) }' \"$CANDIDATE\") || host=\"\"\n if [[ \"$host\" != *.vercel.app ]]; then\n echo \"::error::preview-url '$CANDIDATE' does not parse to a *.vercel.app host (parsed host: '${host:-<unparseable>}')\"\n exit 1\n fi\n url=$(node -e 'const u = new URL(process.argv[1]); if (u.protocol !== \"https:\") process.exit(1); process.stdout.write(u.href)' \"$CANDIDATE\") || {\n echo \"::error::preview-url '$CANDIDATE' did not parse to an https:// URL\"\n exit 1\n }\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n ref: ${{ inputs.sha }}\n # This checks out and runs a PR's own holocron.config.ts —\n # untrusted until reviewed. Never leave a credential sitting\n # in .git/config for that code to read and exfiltrate; no\n # later step in this job needs to push or pull authenticated.\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Resolve author trust\n id: trust\n env:\n # Ambient, always-available -- no new secret. Only used for\n # two read-only lookups, both within what this token already\n # has by default.\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n SHA: ${{ inputs.sha }}\n run: |\n # Deliberately NOT a value carried in through the\n # deployment's own `payload` field (sourcery review on\n # #1058's first attempt): that field is attacker-controlled\n # by anyone with `deployments: write` -- same precondition\n # already needed to create a deployment_status event at all\n # -- so trusting whatever it claims would let that same\n # attacker forge payload.collaborator_permission = \"admin\"\n # on their own crafted deployment and unlock the bypass\n # secret regardless of who actually authored the code. This\n # step derives trust itself, from data it verifies\n # independently: which real PR `inputs.sha` belongs to, and\n # that PR's real author's current push-access level -- an\n # attacker can't forge either without already having\n # genuine write access to this repo.\n #\n # First attempt used\n # github.event.pull_request.author_association instead, and\n # separately turned out to be wrong for a different reason:\n # that field only reports MEMBER for a *publicly visible* org\n # membership, so a maintainer with private org membership\n # reads as CONTRIBUTOR and would wrongly fail-closed on their\n # own PRs (confirmed live on this exact repo, holocron#1057\n # follow-up). This lookup has neither problem: it reflects\n # real access -- direct collaborator, team membership, or\n # org default -- independent of any profile visibility\n # setting, and needs only \"Pull requests: read\" plus the\n # baseline \"Metadata: read\" every token already has.\n #\n # No PR found for this SHA, or no login on it -> \"none\" ->\n # untrusted. admin/maintain/write are the three roles GitHub\n # itself treats as push-capable. Missing or unrecognized ->\n # untrusted (fail-closed): an absent credential is safer\n # than a wrongly granted one.\n author=$(gh api \"repos/${GITHUB_REPOSITORY}/commits/${SHA}/pulls\" --jq '(.[0] // {}) | .user.login // empty' 2>/dev/null) || author=\"\"\n permission=\"none\"\n if [ -n \"$author\" ]; then\n permission=$(gh api \"repos/${GITHUB_REPOSITORY}/collaborators/${author}/permission\" --jq '.permission // \"none\"' 2>/dev/null) || permission=\"none\"\n fi\n case \"$permission\" in\n admin | maintain | write) trusted=true ;;\n *) trusted=false ;;\n esac\n echo \"trusted=$trusted\" >> \"$GITHUB_OUTPUT\"\n\n - name: Resolve monitoring checks\n id: resolve\n # Untrusted: loads and runs a PR's own holocron.config.ts, same\n # as the checkout above. No secrets in this step's env at all\n # (holocron#1032 review) -- VERCEL_TOKEN and\n # VERCEL_PROTECTION_BYPASS_SECRET live only on the step below,\n # which never loads this repo's config and so never runs a\n # single line of PR-authored code.\n uses: theholocron/holocron/ci/actions/holocron@ci-v1\n with:\n command: resolve checks\n args: --cwd=${{ inputs.cwd }} --out=${{ runner.temp }}/monitoring-checks.json\n\n - name: Verify project and run monitoring checks\n env:\n # Read directly by `check resolved`\n # (cli/cli/src/cli/cli.ts) -- not part of the CLI's own\n # `--token`-resolution chain, since neither is a vendor API\n # credential this command calls anything with: VERCEL_TOKEN\n # only verifies, read-only, that the preview URL resolves to\n # vercel-project before VERCEL_PROTECTION_BYPASS_SECRET (a\n # plain header forwarded as-is) is ever attached. The command\n # itself never attaches the bypass header when vercel-project\n # is empty, regardless of whether these secrets are\n # configured -- never attached to an unverified URL.\n #\n # Both gated on `steps.trust.outputs.trusted` (holocron#1057):\n # confirmed live that Vercel forwards this header straight\n # through to the deployed function, so an untrusted PR's own\n # code could read and exfiltrate it off its own incoming\n # request. An untrusted deployment gets neither secret.\n HOLOCRON_VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n HOLOCRON_VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # The bare names stay until every caller's CLI reads the prefixed ones (#1864); a CLI that predates them\n # reads only these. The secrets arrive under the bare names here: the caller (`ci.check-preview.yml`) maps `secrets.HOLOCRON_X || secrets.X` onto them, since this workflow is also called with the bare names by repos on the frozen copy.\n VERCEL_TOKEN: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_TOKEN || '' }}\n VERCEL_PROTECTION_BYPASS_SECRET: ${{ steps.trust.outputs.trusted == 'true' && secrets.VERCEL_PROTECTION_BYPASS_SECRET || '' }}\n # Not a secret and not gated on trust: the org's Vercel team id\n # (the synced org variable HOLOCRON_VERCEL_TEAM_ID, `repo.variables.sync`; the bare VERCEL_TEAM_ID until it is renamed),\n # which scopes the ownership lookup to the right team. It is\n # read from the org's settings, never from the PR's config\n # (`check resolved` loads none), so a PR cannot change it.\n HOLOCRON_VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n VERCEL_TEAM_ID: ${{ vars.HOLOCRON_VERCEL_TEAM_ID || vars.VERCEL_TEAM_ID }}\n uses: theholocron/holocron/ci/actions/holocron@ci-v1\n with:\n command: check resolved\n # vercel-project is NOT gated on trust (sourcery review on\n # #1058's first attempt) -- it isn't a secret, and clearing\n # it for an untrusted deployment would make\n # resolveVercelBypassHeaders treat \"no project given\" as\n # trivially verified (its early-return for an omitted\n # project), skipping ownership verification entirely rather\n # than failing. Always passing the real project here means\n # an untrusted deployment instead hits the \"project given\n # but no token\" branch -- VERCEL_TOKEN is empty above --\n # which fails the check outright, before ever issuing the\n # request, rather than letting an unverified host's response\n # (e.g. a 3xx redirect a status-less assertion wouldn't\n # catch) report green.\n args: --checks-file=${{ runner.temp }}/monitoring-checks.json --vercel-project=${{ inputs.vercel-project }} ${{ steps.validate.outputs.url }}\n";
|
|
517
|
+
var check_tokens_default$1 = "name: Token Expiry\n\n# Runs `holocron doctor secrets --verify` on a schedule, so a token that has been rejected or is about to expire (7 days or\n# fewer left) fails this job and GitHub's failed-workflow notification reaches the team before an operation breaks.\n#\n# Daily, not weekly: the warning window is 7 days, so a weekly run could land just outside it and the next one just\n# after the token lapsed. A daily run fails every day inside the window, which keeps the reminder in view until the\n# token is renewed.\n#\n# A token that is not set is skipped, not a failure, so a repo passes only the secrets it uses. Secrets reach the\n# job through `secrets: inherit`; the declared list below is for callers that pass them explicitly.\n#\n# The run also reads the repo's 1Password credentials provider (`<org/repo> - ci`), so it installs `op` and signs in with\n# `HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`, a read-only service account for that one Environment. Without it the `1password`\n# rows fail and the job is red every day, which hides a real expiry.\n#\n# It reads the `ci` layer only (`--env ci`): the service account sees that one Environment, and without the flag the\n# run also asks for `local` and `dev`, which it cannot read and so reports as missing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_READ_TOKEN:\n description: Fine-grained token for reading repos and Actions runs.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained token for issues.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Fine-grained token for `sync github`.\n required: false\n HOLOCRON_RELEASE_TOKEN:\n description: Fine-grained token for releases.\n required: false\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained token for repo settings.\n required: false\n HOLOCRON_SECRETS_TOKEN:\n description: Fine-grained organization token for organization secrets.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained token for GitHub Pages.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Fine-grained organization token for teams and organization variables.\n required: false\n HOLOCRON_USER_SYNC_TOKEN:\n description: Fine-grained token for the account links files.\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A read-only 1Password service account for the `ci` layer Environment, so the run can compare it with GitHub.\n required: false\n HOLOCRON_HEARTBEAT_CHECK_TOKENS:\n description: The ping URL of the `check-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n token-expiry:\n name: Run holocron doctor secrets --verify\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n HOLOCRON_RELEASE_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN }}\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_SECRETS_TOKEN: ${{ secrets.HOLOCRON_SECRETS_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_USER_SYNC_TOKEN: ${{ secrets.HOLOCRON_USER_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run holocron doctor secrets --verify\n # Only this step holds the service account, not the job: the install action above never sees it.\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n with:\n task: check-tokens\n args: --env ci\n\n # Tells Checkly this run finished (#2359, the `check-tokens` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_CHECK_TOKENS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_CHECK_TOKENS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
534
518
|
var ci_default = "name: CI\n\n# The one stable required check (spec ci-flat-task-vocabulary, \"The aggregate required check\", issue #1613). It polls the\n# Checks API for the head SHA until every expected id has a check run named `<id> / ...` and all of them have\n# completed, and the `codecov/*` commit statuses have reached success, or the timeout passes. An id that never posted\n# fails as \"never posted\". The job summary lists every expected check with a link, failing ones first.\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n expected:\n description: JSON array of check ids; each must have a check run whose name starts with `<id> / `.\n type: string\n required: true\n statuses:\n description: JSON array of contexts (`codecov/patch`, ...) that must reach success, as a check run or a commit status.\n type: string\n required: false\n default: \"[]\"\n timeout-minutes:\n description: How long to wait for the expected checks before failing the ones still missing.\n type: number\n required: false\n default: 30\n interval-seconds:\n description: Seconds between two polls.\n type: number\n required: false\n default: 30\n\npermissions:\n checks: read\n statuses: read\n contents: read\n\njobs:\n ci:\n # The check is `<caller job> / <called job>`, so with the caller job `ci` the required context is\n # `ci / Required checks`.\n name: Required checks\n permissions:\n checks: read\n statuses: read\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 45\n steps:\n - name: Wait for the expected checks\n run: |\n set -euo pipefail\n # Never wait for ourselves: this run is `ci / Required checks`, which an expected `ci` would match.\n expected=$(jq -c 'map(select(. != \"ci\"))' <<<\"$EXPECTED\")\n deadline=$(( $(date +%s) + TIMEOUT_MINUTES * 60 ))\n timed_out=false\n\n while :; do\n runs=$(gh api --paginate \"repos/${REPO}/commits/${SHA}/check-runs?per_page=100\" \\\n --jq '.check_runs[] | {id, name, status, conclusion, started_at, url: .html_url}' | jq -s '.')\n posted=$(gh api \"repos/${REPO}/commits/${SHA}/status?per_page=100\" \\\n --jq '.statuses | map({context, state, url: .target_url})')\n\n rows=$(jq -n -c \\\n --argjson expected \"$expected\" --argjson wanted \"$STATUSES\" \\\n --argjson runs \"$runs\" --argjson posted \"$posted\" --argjson timed_out \"$timed_out\" '\n def ok: . == \"success\" or . == \"skipped\" or . == \"neutral\";\n def row($id; $kind; $state; $detail; $url): {id: $id, kind: $kind, state: $state, detail: $detail, url: $url};\n def expire($r):\n if $timed_out and $r.state == \"pending\" then $r | .state = \"failure\" | .detail = \"timed out while still running\"\n else $r end;\n # A commit can carry several runs of one check (a cancelled first batch, a re-run job): only the newest\n # run of each name counts, whatever the older ones said.\n ($runs | group_by(.name) | map(sort_by([.started_at // \"\", .id // 0]) | last)) as $latest\n | ($expected | map(. as $id\n | ($latest | map(select(.name | startswith($id + \" / \")))) as $found\n | ($found | map(select(.status != \"completed\"))) as $open\n | ($found | map(select(.status == \"completed\" and ((.conclusion // \"\") | ok | not)))) as $bad\n | if ($found | length) == 0 then row($id; \"check\"; \"missing\"; \"never posted\"; null)\n elif ($open | length) > 0 then expire(row($id; \"check\"; \"pending\"; \"still running\"; $open[0].url))\n elif ($bad | length) > 0 then row($id; \"check\"; \"failure\"; ($bad[0].conclusion // \"none\"); $bad[0].url)\n else row($id; \"check\"; \"success\"; $found[0].conclusion; $found[0].url) end))\n + ($wanted | map(. as $context\n # Codecov posts through its GitHub App as a check run named like the context; a plain commit status is\n # the fallback, so either shape counts.\n | ($latest | map(select(.name == $context)) | .[0]) as $c\n | ($posted | map(select(.context == $context)) | .[0]) as $s\n | if $c != null and $c.status != \"completed\" then expire(row($context; \"status\"; \"pending\"; \"still running\"; $c.url))\n elif $c != null and (($c.conclusion // \"\") | ok) then row($context; \"status\"; \"success\"; $c.conclusion; $c.url)\n elif $c != null then row($context; \"status\"; \"failure\"; ($c.conclusion // \"none\"); $c.url)\n elif $s == null then row($context; \"status\"; \"missing\"; \"never posted\"; null)\n elif $s.state == \"pending\" then expire(row($context; \"status\"; \"pending\"; \"still pending\"; $s.url))\n elif $s.state == \"success\" then row($context; \"status\"; \"success\"; \"success\"; $s.url)\n else row($context; \"status\"; \"failure\"; $s.state; $s.url) end))')\n\n unsettled=$(jq 'map(select(.state == \"pending\" or .state == \"missing\")) | length' <<<\"$rows\")\n if [ \"$unsettled\" -eq 0 ] || [ \"$timed_out\" = true ]; then break; fi\n if [ \"$(date +%s)\" -ge \"$deadline\" ]; then\n timed_out=true\n continue\n fi\n sleep \"$INTERVAL\"\n done\n\n failing=$(jq -r 'map(select(.state != \"success\") | .id) | join(\", \")' <<<\"$rows\")\n total=$(jq 'length' <<<\"$rows\")\n\n summary() {\n echo \"## ci\"\n echo\n echo \"| Check | Result | Link |\"\n echo \"| --- | --- | --- |\"\n jq -r '\n def rank: {\"failure\": 0, \"missing\": 1, \"pending\": 2, \"success\": 3}[.state];\n sort_by(rank)[]\n | \"| `\\(.id)` | \\(if .state == \"success\" then \"pass\" else \"FAIL\" end): \\(.detail) | \\(if .url then \"[open](\\(.url))\" else \"none\" end) |\"' <<<\"$rows\"\n if [ -n \"$failing\" ]; then\n echo\n echo \"Re-running one failed check does not update this one: re-run **ci** as well.\"\n fi\n }\n if [ -n \"${GITHUB_STEP_SUMMARY:-}\" ]; then summary >> \"$GITHUB_STEP_SUMMARY\"; else summary; fi\n\n # Colons and commas in an annotation title must be escaped.\n jq -r '.[] | select(.state != \"success\")\n | \"::error title=\\(.id | gsub(\":\"; \"%3A\") | gsub(\",\"; \"%2C\"))::\\(.detail) \\(.url // \"\")\"' <<<\"$rows\"\n\n if [ -n \"$failing\" ]; then\n echo \"ci failed: ${failing}\" >&2\n exit 1\n fi\n echo \"ci passed: all ${total} expected checks are green.\"\n env:\n GH_TOKEN: ${{ github.token }}\n REPO: ${{ github.repository }}\n SHA: ${{ github.event.pull_request.head.sha || github.sha }}\n EXPECTED: ${{ inputs.expected }}\n STATUSES: ${{ inputs.statuses }}\n TIMEOUT_MINUTES: ${{ inputs.timeout-minutes }}\n INTERVAL: ${{ inputs.interval-seconds }}\n";
|
|
535
|
-
var deploy_preview_default$1 = "name: Preview Deploy\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n cwd:\n description: Directory to run the delivery.previewDeploy task from — the opted-in package's own directory in a monorepo. Defaults to the repo root.\n required: false\n type: string\n default: \".\"\n paths:\n description: >\n JSON array of repo-relative path prefixes (each ending in \"/\") --\n a PR touching none of them skips the actual deploy work instead\n of spinning up a Vercel preview for every PR in the monorepo\n regardless of relevance (holocron#1023). Defaults to an empty\n array: no filter, every PR is relevant -- correct for a\n single-repo consumer, where every PR IS a PR to that package.\n required: false\n type: string\n default: \"[]\"\n project:\n description: >\n The Vercel project the previews are deployed to (the `--project-id` of the package's deploy script). The\n cleanup that runs when a PR closes looks for the PR's previews in it; without it, nothing is cleaned up.\n required: false\n type: string\n default: \"\"\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_DEPLOYMENTS_TOKEN:\n description: >\n A dedicated fine-grained PAT (Deployments: read/write only — see\n docs/tokens.md), not the default GITHUB_TOKEN — GitHub does not\n start a new workflow run for a deployment_status event created\n using a run's own GITHUB_TOKEN, which would make a\n deployment_status-triggered check (e.g. delivery.previewCheck)\n silently never fire. No existing HOLOCRON_<FEATURE>_TOKEN carries\n the Deployments permission, so `secrets: inherit` on the thin\n caller forwards nothing for this unless a repo/org secret\n literally named HOLOCRON_DEPLOYMENTS_TOKEN has been provisioned.\n required: false\n\njobs:\n # Two jobs, deliberately not one: \"report\" never checks out the repo at\n # all, so it never runs a single line of this PR's own code. \"deploy\"\n # does — it has to, to build and stage the preview — and runs with\n # VERCEL_TOKEN present for that (tracked as a residual risk, #1020: the\n # build step still runs this monorepo's own PR-affectable CLI build,\n # pre-review). Without the split, a malicious build/stage script could\n # persist a `gh` shim onto $GITHUB_PATH (or similar runner-state\n # tampering) that a LATER step in the SAME job — the one that finally\n # gets GH_TOKEN — would then execute instead of the real `gh` CLI,\n # stealing that token too. Separate jobs run on separate, fresh\n # runners; \"report\" has nothing of the first job's runner state to\n # inherit.\n deploy:\n name: Deploy preview\n # The caller also runs on `closed`, for the cleanup job below; a closed PR is never deployed.\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n # Setup/build/stage, plus the deploy capability's own\n # wait-for-ready polling (up to 10 minutes by itself) — 10 would kill\n # this before that polling could even finish.\n timeout-minutes: 20\n permissions:\n contents: read\n # Listing the PR's changed files (below, via `gh api`) needs this —\n # must be granted here too, not only on the thin caller: GitHub\n # hard-fails the whole run at startup, zero jobs dispatched, if a\n # called reusable workflow's job asks for more than the caller\n # grants (holocron#1058).\n pull-requests: read\n outputs:\n url: ${{ steps.extract.outputs.url }}\n steps:\n - name: Check whether the PR touches any watched path\n id: filter\n env:\n GH_TOKEN: ${{ github.token }}\n PATHS: ${{ inputs.paths }}\n run: |\n # No checkout needed — the PR's changed-file list comes from the\n # API, not local git history (which this job's later shallow\n # checkout, below, doesn't have enough of to diff against the\n # base branch anyway).\n #\n # `jq -e` both parses PATHS and rejects anything that isn't a\n # JSON array (holocron#1069 review) -- a malformed input (bad\n # JSON, or valid JSON that isn't an array) fails the job loudly\n # instead of the process-substitution loop below silently\n # reading zero prefixes and skipping the deploy with a green\n # check and no explanation.\n paths=$(echo \"$PATHS\" | jq -e 'if type != \"array\" then error(\"paths input is not a JSON array\") else . end') || {\n echo \"::error::delivery.previewDeploy's paths input is not a valid JSON array: $PATHS\"\n exit 1\n }\n # `jq 'length'` on the PARSED value, not a comparison against the\n # literal string \"[]\" -- any valid JSON encoding of an empty\n # array (e.g. \" [ ] \") means the same \"no filter\" thing.\n if [ \"$(echo \"$paths\" | jq 'length')\" = \"0\" ]; then\n echo \"relevant=true\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # Both the new name AND the old one for a rename -- a file\n # renamed OUT of a watched package (old path matches, new\n # doesn't) is still a real change to that package's tree.\n files=$(gh api \"repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/files\" --paginate --jq '.[] | .filename, (.previous_filename // empty)')\n file_count=$(echo \"$files\" | grep -c . || true)\n if [ \"$file_count\" -ge 3000 ]; then\n # The pulls-files endpoint caps out at 3,000 entries even with\n # --paginate -- past that, a watched path could be among the\n # files we never saw. Can't prove the PR irrelevant, so fail\n # safe to relevant rather than risk silently skipping a real\n # deploy.\n echo \"::warning::PR has >= 3000 changed files -- can't reliably determine path relevance, treating as relevant\"\n echo \"relevant=true\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n relevant=false\n while IFS= read -r prefix; do\n [ -z \"$prefix\" ] && continue\n while IFS= read -r file; do\n [ -z \"$file\" ] && continue\n # Unquoted $prefix (deliberately) -- case pattern-matches it\n # as a glob, anchored at the START of the repo-relative path\n # (holocron#1069 review: grep -F matched the prefix as a\n # literal substring anywhere in the filename, and couldn't\n # match a configured glob like \"custom/**\" at all). The\n # trailing `*` covers a plain directory prefix like\n # \"apps/sentinel/\"; a caller-supplied prefix that already\n # has its own wildcards (e.g. \"custom/**\") just gets one\n # more, harmlessly.\n case \"$file\" in\n $prefix*) relevant=true; break 2 ;;\n esac\n done <<< \"$files\"\n done < <(echo \"$paths\" | jq -r '.[]')\n echo \"relevant=$relevant\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n with:\n # The PR's exact head SHA, not the default pull_request\n # merge-commit ref — what gets built and deployed must be the\n # exact commit the PR actually points at.\n ref: ${{ github.event.pull_request.head.sha }}\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n\n - name: Check deploy credentials are available\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n id: creds\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n run: |\n # `secrets` isn't valid in a step `if:` (actionlint-enforced) —\n # a fork PR never receives this secret, so the deploy step below\n # skips cleanly on an empty token instead of failing on a\n # missing credential -- correct, and must stay that way: a\n # fork-triggered pull_request run never gets a write-scoped\n # token either, so there's no way to post a PR comment or check\n # run from here regardless (that needs a separate,\n # pull_request_target-triggered job in the base repo's\n # context -- a real feature with its own review surface, not\n # this step; holocron#1027 explicitly scoped this fix to\n # observability only). The ::notice:: below needs no extra\n # permission -- it's a log annotation the runner itself renders,\n # not an API write -- so it's the cheap half of #1027 that IS\n # worth doing here: a visible, on-PR explanation instead of\n # silence.\n if [ -n \"$VERCEL_TOKEN\" ]; then\n echo \"available=true\" >> \"$GITHUB_OUTPUT\"\n else\n echo \"available=false\" >> \"$GITHUB_OUTPUT\"\n echo \"::notice title=No preview deployed::This run has no VERCEL_TOKEN available, so no preview was deployed -- most commonly because GitHub withholds repository secrets from a pull_request run triggered by a fork, though any run missing this secret ends up here the same way. Since this run creates no deployment, it won't trigger delivery.previewCheck for this PR. A maintainer can deploy one manually if needed.\"\n fi\n\n - name: Deploy preview\n id: deploy\n if: ${{ steps.creds.outputs.available == 'true' }}\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n # Tags the preview with the PR it belongs to (`<repo>-pr-<number>`, the alias `deploy cleanup-preview` derives from\n # a PR), so the cleanup on close finds it without depending on anything this workflow records afterwards.\n HOLOCRON_PREVIEW_KEY: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: run deploy-preview\n args: --cwd=${{ inputs.cwd }}\n\n - name: Extract and validate the preview URL\n id: extract\n # Only after a real deploy — false both when the step above\n # failed and when it skipped cleanly (fork PR, no credential).\n if: ${{ steps.deploy.outcome == 'success' }}\n env:\n LOG_FILE: ${{ steps.deploy.outputs.log-file }}\n run: |\n # A loose https://\\S+ grab would match whatever text follows an\n # attacker-chosen URL this log happens to contain; grabbing\n # candidate text here and separately requiring the PARSED\n # hostname end in .vercel.app (below) closes that regardless of\n # how the candidate text is shaped — e.g. a userinfo trick like\n # \"https://x.vercel.app@127.0.0.1/\" would satisfy almost any\n # hand-written regex character class while actually parsing to\n # host 127.0.0.1, which a naive regex-only check already missed\n # once.\n candidate=$(grep -oE 'https://[^[:space:]\"]+' \"$LOG_FILE\" | tail -1)\n if [ -z \"$candidate\" ]; then\n echo \"::error::deploy succeeded but no https:// URL was found in its output\"\n exit 1\n fi\n host=$(node -e 'try { process.stdout.write(new URL(process.argv[1]).hostname) } catch { process.exit(1) }' \"$candidate\") || host=\"\"\n if [[ \"$host\" != *.vercel.app ]]; then\n echo \"::error::extracted URL '$candidate' does not parse to a *.vercel.app host (parsed host: '${host:-<unparseable>}')\"\n exit 1\n fi\n echo \"url=$candidate\" >> \"$GITHUB_OUTPUT\"\n\n report:\n name: Report deployment status\n needs: deploy\n if: ${{ github.event.action != 'closed' && needs.deploy.outputs.url != '' }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n deployments: write\n steps:\n - name: Create GitHub deployment and report status\n env:\n # gh reads GH_TOKEN as its auto-auth env var by its own\n # convention -- the secret feeding it is named\n # HOLOCRON_DEPLOYMENTS_TOKEN, matching this org's\n # HOLOCRON_<FEATURE>_TOKEN naming (docs/tokens.md).\n GH_TOKEN: ${{ secrets.HOLOCRON_DEPLOYMENTS_TOKEN }}\n # The PR's head BRANCH, not its SHA — GitHub's PR \"Environments\"\n # widget associates a Deployment with a PR by matching `ref` to\n # the PR's own branch name, not by SHA. GitHub resolves the\n # branch to whatever commit it points to AT CREATION TIME,\n # though, which is a separate moment from the deploy job's own\n # checkout (below, SHA) -- cross-checked after creation rather\n # than assumed.\n REF: ${{ github.event.pull_request.head.ref }}\n # The exact commit the deploy job checked out and built,\n # captured from the same frozen event payload this whole run\n # was triggered by -- stays constant for the run's lifetime\n # even if the PR branch itself moves while this job is running.\n SHA: ${{ github.event.pull_request.head.sha }}\n URL: ${{ needs.deploy.outputs.url }}\n run: |\n if [ -z \"$GH_TOKEN\" ]; then\n echo \"::error::HOLOCRON_DEPLOYMENTS_TOKEN secret is not set -- posting this status with the default GITHUB_TOKEN would not trigger a deployment_status-triggered check\"\n exit 1\n fi\n\n post_status() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=\"$1\" --field environment_url=\"$URL\" >/dev/null\n }\n latest_status() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" --jq '.[0].state // empty' 2>/dev/null\n }\n # A deployment this very run may have already created\n # server-side on an earlier attempt whose client-side response\n # got lost (e.g. a dropped connection) -- reused instead of\n # creating a second one, which would leave the first\n # permanently pending (nothing ever posts its status). Scoped\n # to the last 2 minutes so an OLDER deployment for the same\n # ref/environment (a previous, unrelated run) is never\n # mistaken for this one.\n find_recent_deployment() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method GET -f ref=\"$REF\" -f environment=sentinel-pr-preview --jq '\n [.[] | select((now - (.created_at | fromdateiso8601)) < 120)] | sort_by(.created_at) | last | .id // empty' 2>/dev/null\n }\n\n # jq, not a hand-built string -- a branch name containing a\n # literal double quote (git allows it; GitHub's branch-naming\n # rules don't forbid it either) would otherwise break out of a\n # printf-constructed JSON string and produce an invalid payload\n # gh api can't send.\n payload=$(jq -n --arg ref \"$REF\" '{\n ref: $ref,\n environment: \"sentinel-pr-preview\",\n description: \"Vercel Preview (file deploy)\",\n production_environment: false,\n auto_merge: false,\n required_contexts: []\n }')\n deploy_id=\"\"\n for attempt in 1 2 3; do\n deploy_id=$(find_recent_deployment)\n if [ -n \"$deploy_id\" ]; then\n echo \"reusing deployment ${deploy_id} created by an earlier attempt of this run\" >&2\n break\n fi\n deploy_id=$(echo \"$payload\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method POST --input - | jq -r '.id // empty')\n if [ -n \"$deploy_id\" ]; then break; fi\n echo \"deployment creation failed (attempt ${attempt}/3) -- retrying...\" >&2\n sleep 5\n done\n if [ -z \"$deploy_id\" ]; then\n echo \"::error::failed to create a GitHub deployment after 3 attempts -- Vercel already has the preview, but nothing will report or check it\"\n exit 1\n fi\n\n # `ref` resolves to the branch's CURRENT tip at creation time --\n # only guaranteed to be the commit this job actually built if\n # the branch hasn't moved since the triggering push. A push to\n # the same PR while this job was still running would otherwise\n # silently associate the preview URL (built from the OLD\n # commit) with the NEW commit's deployment. A newer workflow\n # run already covers that new commit (cancel-in-progress:\n # false queues rather than cancels), so failing this stale one\n # loses nothing.\n deployed_sha=$(gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}\" --jq '.sha // empty')\n if [ \"$deployed_sha\" != \"$SHA\" ]; then\n echo \"::error::deployment ${deploy_id} resolved to ${deployed_sha}, not the deployed commit ${SHA} -- the PR branch moved while this job was running; a newer run already covers the new commit\"\n exit 1\n fi\n\n for attempt in 1 2 3; do\n if post_status success; then\n exit 0\n fi\n # The POST may have actually succeeded server-side even though\n # this client call reported failure (e.g. a dropped connection\n # after GitHub processed it) — checked before retrying, so a\n # transient client-side error never posts a second success and\n # fires delivery.previewCheck twice for the same preview.\n if [ \"$(latest_status)\" = \"success\" ]; then\n exit 0\n fi\n echo \"status POST failed (attempt ${attempt}/3) for deployment ${deploy_id} -- retrying...\" >&2\n sleep 5\n done\n\n # Exhausted retries — one last attempt to mark the deployment\n # failed rather than leaving it permanently \"pending\" in GitHub's\n # UI; best-effort, its own failure doesn't change this step's\n # already-failed outcome.\n post_status error || true\n echo \"::error::failed to post a success status for deployment ${deploy_id} after 3 attempts -- marked it failed instead of leaving it pending\"\n exit 1\n\n # When the PR closes (merged or not), its previews go: `holocron deploy cleanup-preview` finds the Vercel deployments\n # the deploy job tagged for this PR (HOLOCRON_PREVIEW_KEY, `<repo>-pr-<number>`) in the project and deletes them, then\n # the GitHub deployments that pointed at them are marked inactive (not deleted, so the PR keeps its history). The\n # CLI is the base branch's, never the PR's: the checkout is the commit the PR targets, so none of the PR's own code\n # runs with the Vercel token (holocron#1021, #1020).\n cleanup:\n name: Clean up previews\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n deployments: write\n pull-requests: read\n steps:\n - name: Check what the cleanup needs\n id: needs\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n PROJECT: ${{ inputs.project }}\n run: |\n if [ -z \"$PROJECT\" ]; then\n echo \"::warning title=No previews deleted::This workflow was called without its \\`project\\` input (the Vercel project the previews are deployed to), so there is nothing to look in.\"\n echo \"ready=false\" >> \"$GITHUB_OUTPUT\"\n elif [ -z \"$VERCEL_TOKEN\" ]; then\n # A fork PR never receives this secret (and never had a preview made), so there is nothing to delete.\n echo \"::notice title=No previews deleted::This run has no VERCEL_TOKEN available, so no Vercel preview was deleted -- most commonly a pull_request run triggered by a fork, which never had one deployed.\"\n echo \"ready=false\" >> \"$GITHUB_OUTPUT\"\n else\n echo \"ready=true\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the base branch\n if: ${{ steps.needs.outputs.ready == 'true' }}\n with:\n # The commit the PR targets, not its head: the CLI that runs below is code already reviewed and merged.\n ref: ${{ github.event.pull_request.base.sha }}\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ steps.needs.outputs.ready == 'true' }}\n\n - name: Delete the PR's Vercel previews\n id: cleanup\n if: ${{ steps.needs.outputs.ready == 'true' }}\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n # The pull request is looked up through the `source` provider.\n GITHUB_TOKEN: ${{ github.token }}\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: deploy cleanup-preview ${{ github.event.pull_request.number }}\n args: --cwd=${{ inputs.cwd }} --project=${{ inputs.project }} --repo=${{ github.repository }} --yes\n\n - name: Mark the PR's GitHub deployments inactive\n # Only after the previews are confirmed deleted (or there were none): a deployment whose preview is still live\n # keeps saying so.\n if: ${{ steps.cleanup.outcome == 'success' }}\n env:\n GH_TOKEN: ${{ github.token }}\n # The PR's head branch: how the \"report\" job named the GitHub deployments it made.\n REF: ${{ github.event.pull_request.head.ref }}\n run: |\n deploy_ids=$(gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method GET --paginate -f ref=\"$REF\" -f environment=sentinel-pr-preview --jq '.[].id') || {\n echo \"::error::could not list the GitHub deployments for ${REF}\"\n exit 1\n }\n failed=0\n for deploy_id in $deploy_ids; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive >/dev/null || {\n echo \"::error::could not mark deployment ${deploy_id} inactive\"\n failed=1\n }\n done\n exit \"$failed\"\n";
|
|
536
|
-
var deploy_sentinel_default$1 = "name: Deploy Sentinel\n\n# Sentinel's production deploy (holocron#800): `pnpm run deploy` in `apps/sentinel` (build, stage, `holocron deploy`),\n# the command a person runs from a checkout. The caller runs it on demand; `deploy-sentinel-production.yml` runs it after\n# a stable release on `main`. The job waits for an approval: it declares the `sentinel-production` Environment, whose\n# required reviewers decide, and whose secret holds the Vercel token, so no other job can read it (#2665). `alpha` code is\n# never deployed here: the preview instance has its own workflow, project and secrets (spec `tech-sentinel-preview-instance`).\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n ref:\n description: The commit to deploy. Empty means the commit the calling workflow ran on.\n required: false\n default: \"\"\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the deploy uses. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n\njobs:\n deploy-sentinel:\n name: Build, stage and deploy Sentinel\n # Waits for a reviewer of the Environment before it starts.\n environment: sentinel-production\n # One deploy at a time, and a running one is never cancelled halfway.\n concurrency:\n group: sentinel-deploy\n cancel-in-progress: false\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n ref: ${{ inputs.ref }}\n\n - uses: theholocron
|
|
537
|
-
var deploy_default$1 = "name: Deploy\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n\njobs:\n deploy:\n name: Deploy\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pages: write\n id-token: write\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
538
|
-
var doctor_tokens_default$1 = "name: Doctor Tokens\n\n# Runs `holocron doctor tokens` on a schedule (#2158, epic #2147): for each layer and each token a configured plugin\n# declares, it reads the layer's 1Password Environment in memory and runs the provider's `token` probe against the token\n# held there, so a token that gained a permission it must not have, lost one it needs, is past its rotation age or is near\n# its expiry fails this job. A failed run reaches #alerts through `platform.notifications.yml`; there is no other channel.\n#\n# Only what the runner can read is checked. The job reads Environments through a 1Password service account\n# (`HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`); it reads the `ci` Environment and nothing else, never `prod`. A layer the\n# account cannot read (`local`, `dev`) is a `skip` row with the reason, never a failure, so the run proves what CI\n# itself can reach and says what it did not look at. `doctor tokens` has no flag to limit the layers: a layer the account\n# can read is checked, and its fail rules are unchanged. Without the secret every row is a skip and the run passes, which\n# the job notes with a warning.\n#\n# Daily, a little after `check-tokens`, so a token near its expiry stays in view until it is renewed. Values are never\n# printed: the probes scrub every token they use from their output.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `ci` layer Environment.\n required: false\n HOLOCRON_HEARTBEAT_DOCTOR_TOKENS:\n description: The ping URL of the `doctor-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n doctor-tokens:\n name: Run holocron doctor tokens\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n # The Axiom probe names the dataset it reads; the workflows read each organization variable as HOLOCRON_X || X.\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET || vars.AXIOM_DATASET }}\n steps:\n - name: Warn when no Environment can be read\n if: ${{ env.OP_SERVICE_ACCOUNT_TOKEN == '' }}\n run: echo \"::warning::HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN is not set, so no Environment can be read and every row is a skip.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
519
|
+
var deploy_preview_default$1 = "name: Preview Deploy\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n cwd:\n description: Directory to run the delivery.previewDeploy task from — the opted-in package's own directory in a monorepo. Defaults to the repo root.\n required: false\n type: string\n default: \".\"\n paths:\n description: >\n JSON array of repo-relative path prefixes (each ending in \"/\") --\n a PR touching none of them skips the actual deploy work instead\n of spinning up a Vercel preview for every PR in the monorepo\n regardless of relevance (holocron#1023). Defaults to an empty\n array: no filter, every PR is relevant -- correct for a\n single-repo consumer, where every PR IS a PR to that package.\n required: false\n type: string\n default: \"[]\"\n project:\n description: >\n The Vercel project the previews are deployed to (the `--project-id` of the package's deploy script). The\n cleanup that runs when a PR closes looks for the PR's previews in it; without it, nothing is cleaned up.\n required: false\n type: string\n default: \"\"\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_DEPLOYMENTS_TOKEN:\n description: >\n A dedicated fine-grained PAT (Deployments: read/write only — see\n docs/tokens.md), not the default GITHUB_TOKEN — GitHub does not\n start a new workflow run for a deployment_status event created\n using a run's own GITHUB_TOKEN, which would make a\n deployment_status-triggered check (e.g. delivery.previewCheck)\n silently never fire. No existing HOLOCRON_<FEATURE>_TOKEN carries\n the Deployments permission, so `secrets: inherit` on the thin\n caller forwards nothing for this unless a repo/org secret\n literally named HOLOCRON_DEPLOYMENTS_TOKEN has been provisioned.\n required: false\n\njobs:\n # Two jobs, deliberately not one: \"report\" never checks out the repo at\n # all, so it never runs a single line of this PR's own code. \"deploy\"\n # does — it has to, to build and stage the preview — and runs with\n # VERCEL_TOKEN present for that (tracked as a residual risk, #1020: the\n # build step still runs this monorepo's own PR-affectable CLI build,\n # pre-review). Without the split, a malicious build/stage script could\n # persist a `gh` shim onto $GITHUB_PATH (or similar runner-state\n # tampering) that a LATER step in the SAME job — the one that finally\n # gets GH_TOKEN — would then execute instead of the real `gh` CLI,\n # stealing that token too. Separate jobs run on separate, fresh\n # runners; \"report\" has nothing of the first job's runner state to\n # inherit.\n deploy:\n name: Deploy preview\n # The caller also runs on `closed`, for the cleanup job below; a closed PR is never deployed.\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n # Setup/build/stage, plus the deploy capability's own\n # wait-for-ready polling (up to 10 minutes by itself) — 10 would kill\n # this before that polling could even finish.\n timeout-minutes: 20\n permissions:\n contents: read\n # Listing the PR's changed files (below, via `gh api`) needs this —\n # must be granted here too, not only on the thin caller: GitHub\n # hard-fails the whole run at startup, zero jobs dispatched, if a\n # called reusable workflow's job asks for more than the caller\n # grants (holocron#1058).\n pull-requests: read\n outputs:\n url: ${{ steps.extract.outputs.url }}\n steps:\n - name: Check whether the PR touches any watched path\n id: filter\n env:\n GH_TOKEN: ${{ github.token }}\n PATHS: ${{ inputs.paths }}\n run: |\n # No checkout needed — the PR's changed-file list comes from the\n # API, not local git history (which this job's later shallow\n # checkout, below, doesn't have enough of to diff against the\n # base branch anyway).\n #\n # `jq -e` both parses PATHS and rejects anything that isn't a\n # JSON array (holocron#1069 review) -- a malformed input (bad\n # JSON, or valid JSON that isn't an array) fails the job loudly\n # instead of the process-substitution loop below silently\n # reading zero prefixes and skipping the deploy with a green\n # check and no explanation.\n paths=$(echo \"$PATHS\" | jq -e 'if type != \"array\" then error(\"paths input is not a JSON array\") else . end') || {\n echo \"::error::delivery.previewDeploy's paths input is not a valid JSON array: $PATHS\"\n exit 1\n }\n # `jq 'length'` on the PARSED value, not a comparison against the\n # literal string \"[]\" -- any valid JSON encoding of an empty\n # array (e.g. \" [ ] \") means the same \"no filter\" thing.\n if [ \"$(echo \"$paths\" | jq 'length')\" = \"0\" ]; then\n echo \"relevant=true\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # Both the new name AND the old one for a rename -- a file\n # renamed OUT of a watched package (old path matches, new\n # doesn't) is still a real change to that package's tree.\n files=$(gh api \"repos/${GITHUB_REPOSITORY}/pulls/${{ github.event.pull_request.number }}/files\" --paginate --jq '.[] | .filename, (.previous_filename // empty)')\n file_count=$(echo \"$files\" | grep -c . || true)\n if [ \"$file_count\" -ge 3000 ]; then\n # The pulls-files endpoint caps out at 3,000 entries even with\n # --paginate -- past that, a watched path could be among the\n # files we never saw. Can't prove the PR irrelevant, so fail\n # safe to relevant rather than risk silently skipping a real\n # deploy.\n echo \"::warning::PR has >= 3000 changed files -- can't reliably determine path relevance, treating as relevant\"\n echo \"relevant=true\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n relevant=false\n while IFS= read -r prefix; do\n [ -z \"$prefix\" ] && continue\n while IFS= read -r file; do\n [ -z \"$file\" ] && continue\n # Unquoted $prefix (deliberately) -- case pattern-matches it\n # as a glob, anchored at the START of the repo-relative path\n # (holocron#1069 review: grep -F matched the prefix as a\n # literal substring anywhere in the filename, and couldn't\n # match a configured glob like \"custom/**\" at all). The\n # trailing `*` covers a plain directory prefix like\n # \"apps/sentinel/\"; a caller-supplied prefix that already\n # has its own wildcards (e.g. \"custom/**\") just gets one\n # more, harmlessly.\n case \"$file\" in\n $prefix*) relevant=true; break 2 ;;\n esac\n done <<< \"$files\"\n done < <(echo \"$paths\" | jq -r '.[]')\n echo \"relevant=$relevant\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n with:\n # The PR's exact head SHA, not the default pull_request\n # merge-commit ref — what gets built and deployed must be the\n # exact commit the PR actually points at.\n ref: ${{ github.event.pull_request.head.sha }}\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n\n - name: Check deploy credentials are available\n if: ${{ steps.filter.outputs.relevant == 'true' }}\n id: creds\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n run: |\n # `secrets` isn't valid in a step `if:` (actionlint-enforced) —\n # a fork PR never receives this secret, so the deploy step below\n # skips cleanly on an empty token instead of failing on a\n # missing credential -- correct, and must stay that way: a\n # fork-triggered pull_request run never gets a write-scoped\n # token either, so there's no way to post a PR comment or check\n # run from here regardless (that needs a separate,\n # pull_request_target-triggered job in the base repo's\n # context -- a real feature with its own review surface, not\n # this step; holocron#1027 explicitly scoped this fix to\n # observability only). The ::notice:: below needs no extra\n # permission -- it's a log annotation the runner itself renders,\n # not an API write -- so it's the cheap half of #1027 that IS\n # worth doing here: a visible, on-PR explanation instead of\n # silence.\n if [ -n \"$VERCEL_TOKEN\" ]; then\n echo \"available=true\" >> \"$GITHUB_OUTPUT\"\n else\n echo \"available=false\" >> \"$GITHUB_OUTPUT\"\n echo \"::notice title=No preview deployed::This run has no VERCEL_TOKEN available, so no preview was deployed -- most commonly because GitHub withholds repository secrets from a pull_request run triggered by a fork, though any run missing this secret ends up here the same way. Since this run creates no deployment, it won't trigger delivery.previewCheck for this PR. A maintainer can deploy one manually if needed.\"\n fi\n\n - name: Deploy preview\n id: deploy\n if: ${{ steps.creds.outputs.available == 'true' }}\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n # Tags the preview with the PR it belongs to (`<repo>-pr-<number>`, the alias `deploy cleanup-preview` derives from\n # a PR), so the cleanup on close finds it without depending on anything this workflow records afterwards.\n HOLOCRON_PREVIEW_KEY: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n uses: theholocron/holocron/ci/actions/holocron@ci-v1\n with:\n command: run deploy-preview\n args: --cwd=${{ inputs.cwd }}\n\n - name: Extract and validate the preview URL\n id: extract\n # Only after a real deploy — false both when the step above\n # failed and when it skipped cleanly (fork PR, no credential).\n if: ${{ steps.deploy.outcome == 'success' }}\n env:\n LOG_FILE: ${{ steps.deploy.outputs.log-file }}\n run: |\n # A loose https://\\S+ grab would match whatever text follows an\n # attacker-chosen URL this log happens to contain; grabbing\n # candidate text here and separately requiring the PARSED\n # hostname end in .vercel.app (below) closes that regardless of\n # how the candidate text is shaped — e.g. a userinfo trick like\n # \"https://x.vercel.app@127.0.0.1/\" would satisfy almost any\n # hand-written regex character class while actually parsing to\n # host 127.0.0.1, which a naive regex-only check already missed\n # once.\n candidate=$(grep -oE 'https://[^[:space:]\"]+' \"$LOG_FILE\" | tail -1)\n if [ -z \"$candidate\" ]; then\n echo \"::error::deploy succeeded but no https:// URL was found in its output\"\n exit 1\n fi\n host=$(node -e 'try { process.stdout.write(new URL(process.argv[1]).hostname) } catch { process.exit(1) }' \"$candidate\") || host=\"\"\n if [[ \"$host\" != *.vercel.app ]]; then\n echo \"::error::extracted URL '$candidate' does not parse to a *.vercel.app host (parsed host: '${host:-<unparseable>}')\"\n exit 1\n fi\n echo \"url=$candidate\" >> \"$GITHUB_OUTPUT\"\n\n report:\n name: Report deployment status\n needs: deploy\n if: ${{ github.event.action != 'closed' && needs.deploy.outputs.url != '' }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n deployments: write\n steps:\n - name: Create GitHub deployment and report status\n env:\n # gh reads GH_TOKEN as its auto-auth env var by its own\n # convention -- the secret feeding it is named\n # HOLOCRON_DEPLOYMENTS_TOKEN, matching this org's\n # HOLOCRON_<FEATURE>_TOKEN naming (docs/tokens.md).\n GH_TOKEN: ${{ secrets.HOLOCRON_DEPLOYMENTS_TOKEN }}\n # The PR's head BRANCH, not its SHA — GitHub's PR \"Environments\"\n # widget associates a Deployment with a PR by matching `ref` to\n # the PR's own branch name, not by SHA. GitHub resolves the\n # branch to whatever commit it points to AT CREATION TIME,\n # though, which is a separate moment from the deploy job's own\n # checkout (below, SHA) -- cross-checked after creation rather\n # than assumed.\n REF: ${{ github.event.pull_request.head.ref }}\n # The exact commit the deploy job checked out and built,\n # captured from the same frozen event payload this whole run\n # was triggered by -- stays constant for the run's lifetime\n # even if the PR branch itself moves while this job is running.\n SHA: ${{ github.event.pull_request.head.sha }}\n URL: ${{ needs.deploy.outputs.url }}\n run: |\n if [ -z \"$GH_TOKEN\" ]; then\n echo \"::error::HOLOCRON_DEPLOYMENTS_TOKEN secret is not set -- posting this status with the default GITHUB_TOKEN would not trigger a deployment_status-triggered check\"\n exit 1\n fi\n\n post_status() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=\"$1\" --field environment_url=\"$URL\" >/dev/null\n }\n latest_status() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" --jq '.[0].state // empty' 2>/dev/null\n }\n # A deployment this very run may have already created\n # server-side on an earlier attempt whose client-side response\n # got lost (e.g. a dropped connection) -- reused instead of\n # creating a second one, which would leave the first\n # permanently pending (nothing ever posts its status). Scoped\n # to the last 2 minutes so an OLDER deployment for the same\n # ref/environment (a previous, unrelated run) is never\n # mistaken for this one.\n find_recent_deployment() {\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method GET -f ref=\"$REF\" -f environment=sentinel-pr-preview --jq '\n [.[] | select((now - (.created_at | fromdateiso8601)) < 120)] | sort_by(.created_at) | last | .id // empty' 2>/dev/null\n }\n\n # jq, not a hand-built string -- a branch name containing a\n # literal double quote (git allows it; GitHub's branch-naming\n # rules don't forbid it either) would otherwise break out of a\n # printf-constructed JSON string and produce an invalid payload\n # gh api can't send.\n payload=$(jq -n --arg ref \"$REF\" '{\n ref: $ref,\n environment: \"sentinel-pr-preview\",\n description: \"Vercel Preview (file deploy)\",\n production_environment: false,\n auto_merge: false,\n required_contexts: []\n }')\n deploy_id=\"\"\n for attempt in 1 2 3; do\n deploy_id=$(find_recent_deployment)\n if [ -n \"$deploy_id\" ]; then\n echo \"reusing deployment ${deploy_id} created by an earlier attempt of this run\" >&2\n break\n fi\n deploy_id=$(echo \"$payload\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method POST --input - | jq -r '.id // empty')\n if [ -n \"$deploy_id\" ]; then break; fi\n echo \"deployment creation failed (attempt ${attempt}/3) -- retrying...\" >&2\n sleep 5\n done\n if [ -z \"$deploy_id\" ]; then\n echo \"::error::failed to create a GitHub deployment after 3 attempts -- Vercel already has the preview, but nothing will report or check it\"\n exit 1\n fi\n\n # `ref` resolves to the branch's CURRENT tip at creation time --\n # only guaranteed to be the commit this job actually built if\n # the branch hasn't moved since the triggering push. A push to\n # the same PR while this job was still running would otherwise\n # silently associate the preview URL (built from the OLD\n # commit) with the NEW commit's deployment. A newer workflow\n # run already covers that new commit (cancel-in-progress:\n # false queues rather than cancels), so failing this stale one\n # loses nothing.\n deployed_sha=$(gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}\" --jq '.sha // empty')\n if [ \"$deployed_sha\" != \"$SHA\" ]; then\n echo \"::error::deployment ${deploy_id} resolved to ${deployed_sha}, not the deployed commit ${SHA} -- the PR branch moved while this job was running; a newer run already covers the new commit\"\n exit 1\n fi\n\n for attempt in 1 2 3; do\n if post_status success; then\n exit 0\n fi\n # The POST may have actually succeeded server-side even though\n # this client call reported failure (e.g. a dropped connection\n # after GitHub processed it) — checked before retrying, so a\n # transient client-side error never posts a second success and\n # fires delivery.previewCheck twice for the same preview.\n if [ \"$(latest_status)\" = \"success\" ]; then\n exit 0\n fi\n echo \"status POST failed (attempt ${attempt}/3) for deployment ${deploy_id} -- retrying...\" >&2\n sleep 5\n done\n\n # Exhausted retries — one last attempt to mark the deployment\n # failed rather than leaving it permanently \"pending\" in GitHub's\n # UI; best-effort, its own failure doesn't change this step's\n # already-failed outcome.\n post_status error || true\n echo \"::error::failed to post a success status for deployment ${deploy_id} after 3 attempts -- marked it failed instead of leaving it pending\"\n exit 1\n\n # When the PR closes (merged or not), its previews go: `holocron deploy cleanup-preview` finds the Vercel deployments\n # the deploy job tagged for this PR (HOLOCRON_PREVIEW_KEY, `<repo>-pr-<number>`) in the project and deletes them, then\n # the GitHub deployments that pointed at them are marked inactive (not deleted, so the PR keeps its history). The\n # CLI is the base branch's, never the PR's: the checkout is the commit the PR targets, so none of the PR's own code\n # runs with the Vercel token (holocron#1021, #1020).\n cleanup:\n name: Clean up previews\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n deployments: write\n pull-requests: read\n steps:\n - name: Check what the cleanup needs\n id: needs\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n PROJECT: ${{ inputs.project }}\n run: |\n if [ -z \"$PROJECT\" ]; then\n echo \"::warning title=No previews deleted::This workflow was called without its \\`project\\` input (the Vercel project the previews are deployed to), so there is nothing to look in.\"\n echo \"ready=false\" >> \"$GITHUB_OUTPUT\"\n elif [ -z \"$VERCEL_TOKEN\" ]; then\n # A fork PR never receives this secret (and never had a preview made), so there is nothing to delete.\n echo \"::notice title=No previews deleted::This run has no VERCEL_TOKEN available, so no Vercel preview was deleted -- most commonly a pull_request run triggered by a fork, which never had one deployed.\"\n echo \"ready=false\" >> \"$GITHUB_OUTPUT\"\n else\n echo \"ready=true\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the base branch\n if: ${{ steps.needs.outputs.ready == 'true' }}\n with:\n # The commit the PR targets, not its head: the CLI that runs below is code already reviewed and merged.\n ref: ${{ github.event.pull_request.base.sha }}\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: ${{ steps.needs.outputs.ready == 'true' }}\n\n - name: Delete the PR's Vercel previews\n id: cleanup\n if: ${{ steps.needs.outputs.ready == 'true' }}\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n # The pull request is looked up through the `source` provider.\n GITHUB_TOKEN: ${{ github.token }}\n uses: theholocron/holocron/ci/actions/holocron@ci-v1\n with:\n command: deploy cleanup-preview ${{ github.event.pull_request.number }}\n args: --cwd=${{ inputs.cwd }} --project=${{ inputs.project }} --repo=${{ github.repository }} --yes\n\n - name: Mark the PR's GitHub deployments inactive\n # Only after the previews are confirmed deleted (or there were none): a deployment whose preview is still live\n # keeps saying so.\n if: ${{ steps.cleanup.outcome == 'success' }}\n env:\n GH_TOKEN: ${{ github.token }}\n # The PR's head branch: how the \"report\" job named the GitHub deployments it made.\n REF: ${{ github.event.pull_request.head.ref }}\n run: |\n deploy_ids=$(gh api \"repos/${GITHUB_REPOSITORY}/deployments\" --method GET --paginate -f ref=\"$REF\" -f environment=sentinel-pr-preview --jq '.[].id') || {\n echo \"::error::could not list the GitHub deployments for ${REF}\"\n exit 1\n }\n failed=0\n for deploy_id in $deploy_ids; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive >/dev/null || {\n echo \"::error::could not mark deployment ${deploy_id} inactive\"\n failed=1\n }\n done\n exit \"$failed\"\n";
|
|
520
|
+
var deploy_sentinel_default$1 = "name: Deploy Sentinel\n\n# Sentinel's production deploy (holocron#800): `pnpm run deploy` in `apps/sentinel` (build, stage, `holocron deploy`),\n# the command a person runs from a checkout. The caller runs it on demand; `deploy-sentinel-production.yml` runs it after\n# a stable release on `main`. The job waits for an approval: it declares the `sentinel-production` Environment, whose\n# required reviewers decide, and whose secret holds the Vercel token, so no other job can read it (#2665). `alpha` code is\n# never deployed here: the preview instance has its own workflow, project and secrets (spec `tech-sentinel-preview-instance`).\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n ref:\n description: The commit to deploy. Empty means the commit the calling workflow ran on.\n required: false\n default: \"\"\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the deploy uses. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n\njobs:\n deploy-sentinel:\n name: Build, stage and deploy Sentinel\n # Waits for a reviewer of the Environment before it starts.\n environment: sentinel-production\n # One deploy at a time, and a running one is never cancelled halfway.\n concurrency:\n group: sentinel-deploy\n cancel-in-progress: false\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n ref: ${{ inputs.ref }}\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Build, stage, and deploy\n working-directory: apps/sentinel\n run: pnpm run deploy\n";
|
|
521
|
+
var deploy_default$1 = "name: Deploy\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n\njobs:\n deploy:\n name: Deploy\n runs-on: ubuntu-latest\n permissions:\n contents: read\n pages: write\n id-token: write\n environment:\n name: github-pages\n url: ${{ steps.deployment.outputs.page_url }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' }}\n run: pnpm -C docs run build-docs\n\n - name: Build Storybook projects\n if: ${{ inputs.storybook-projects != '[]' }}\n env:\n PROJECTS: ${{ inputs.storybook-projects }}\n run: |\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n pnpm -C \"$workingDir\" build:storybook\n done\n\n - name: Build Storybook\n if: ${{ inputs.type == 'storybook' && inputs.storybook-projects == '[]' }}\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n run: pnpm run \"$BUILD_SCRIPT\"\n\n - name: Assemble site\n env:\n DEPLOY_TYPE: ${{ inputs.type }}\n PROJECTS: ${{ inputs.storybook-projects }}\n STORYBOOK_OUTPUT_DIR: ${{ inputs.output-dir }}\n run: |\n mkdir -p _site\n if [ \"$DEPLOY_TYPE\" = \"docs\" ]; then\n cp -r docs/dist/. _site/\n fi\n if [ \"$PROJECTS\" != \"[]\" ]; then\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n name=$(echo \"$project\" | jq -r '.name // \"\"')\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n outputDir=$(echo \"$project\" | jq -r '.outputDir // \"storybook-static\"')\n if [ -n \"$name\" ]; then\n target=\"_site/sandbox/${name}\"\n else\n target=\"_site/sandbox\"\n fi\n mkdir -p \"$target\"\n cp -r \"${workingDir}/${outputDir}/.\" \"$target/\"\n done\n elif [ \"$DEPLOY_TYPE\" = \"storybook\" ]; then\n mkdir -p _site/sandbox\n cp -r \"${STORYBOOK_OUTPUT_DIR}/.\" _site/sandbox/\n fi\n\n - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0\n name: Upload pages artifact\n with:\n path: _site\n\n - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1\n id: deployment\n name: Deploy to GitHub Pages\n";
|
|
522
|
+
var doctor_tokens_default$1 = "name: Doctor Tokens\n\n# Runs `holocron doctor tokens` on a schedule (#2158, epic #2147): for each layer and each token a configured plugin\n# declares, it reads the layer's 1Password Environment in memory and runs the provider's `token` probe against the token\n# held there, so a token that gained a permission it must not have, lost one it needs, is past its rotation age or is near\n# its expiry fails this job. A failed run reaches #alerts through `platform.notifications.yml`; there is no other channel.\n#\n# Only what the runner can read is checked. The job reads Environments through a 1Password service account\n# (`HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN`); it reads the `ci` Environment and nothing else, never `prod`. A layer the\n# account cannot read (`local`, `dev`) is a `skip` row with the reason, never a failure, so the run proves what CI\n# itself can reach and says what it did not look at. `doctor tokens` has no flag to limit the layers: a layer the account\n# can read is checked, and its fail rules are unchanged. Without the secret every row is a skip and the run passes, which\n# the job notes with a warning.\n#\n# Daily, a little after `check-tokens`, so a token near its expiry stays in view until it is renewed. Values are never\n# printed: the probes scrub every token they use from their output.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `ci` layer Environment.\n required: false\n HOLOCRON_HEARTBEAT_DOCTOR_TOKENS:\n description: The ping URL of the `doctor-tokens` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n doctor-tokens:\n name: Run holocron doctor tokens\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n # The Axiom probe names the dataset it reads; the workflows read each organization variable as HOLOCRON_X || X.\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET || vars.AXIOM_DATASET }}\n steps:\n - name: Warn when no Environment can be read\n if: ${{ env.OP_SERVICE_ACCOUNT_TOKEN == '' }}\n run: echo \"::warning::HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN is not set, so no Environment can be read and every row is a skip.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run holocron doctor tokens\n with:\n task: doctor-tokens\n\n # Tells Checkly this run finished (#2359, the `doctor-tokens` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_DOCTOR_TOKENS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_DOCTOR_TOKENS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
539
523
|
var greet_default$1 = "name: Greetings\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n\njobs:\n greeting:\n name: Greet first-time contributors\n permissions:\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n # Group by the issue/PR number so duplicate events don't race each other.\n steps:\n - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0\n name: Greet on first contribution\n with:\n script: |\n // Only greet on the initial open — ignore synchronize, reopened, etc.\n if (context.payload.action !== 'opened') return;\n\n const actor = context.actor;\n const { owner, repo } = context.repo;\n\n // Payload inspection is more reliable than context.eventName for detecting\n // whether this is an issue vs. PR event — works regardless of how GitHub\n // propagates event names through workflow_call chains.\n const isIssue = !!context.payload.issue && !context.payload.pull_request;\n // listForRepo returns both issues and PRs (GitHub treats PRs as issues),\n // sorted newest-first. Filter by type to track first-issue and first-PR\n // independently, and avoid search-index eventual-consistency lag.\n const { data: recent } = await github.rest.issues.listForRepo({\n owner, repo,\n creator: actor,\n state: 'all',\n per_page: 100\n });\n\n const sameType = recent.filter(item =>\n isIssue ? !item.pull_request : !!item.pull_request\n );\n\n if (sameType.length !== 1) return;\n const body = isIssue\n ? `Hey @${actor}!\\n\\nWe really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`\n : `Hey @${actor}!\\n\\nWe really appreciate you taking the time to help out with this PR. The collaborators on this project attempt to help as many people as possible, but we are a limited number of volunteers, so it is possible that this will not be addressed as swiftly.\\n\\nYour patience is much appreciated and we will get back to you as quickly as possible.`;\n\n await github.rest.issues.createComment({\n owner,\n repo,\n issue_number: context.issue.number,\n body\n });\n";
|
|
540
524
|
var label_default$1 = "name: Bookkeeping\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n configuration-path:\n description: Path to the labeler configuration file in the calling repo\n type: string\n required: false\n default: .github/labeler.yml\n\njobs:\n label:\n name: Apply Labels\n permissions:\n contents: read\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n with:\n sparse-checkout: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n sparse-checkout-cone-mode: false\n\n - uses: github/issue-labeler@ccca1e16fcb66762200e616fc29b57b940c1cb67 # v3.5\n if: ${{ github.event_name == 'pull_request' && hashFiles(inputs.configuration-path || '.github/labeler.yml') != '' }}\n # v3.4 bundles Node 20; allow it to run under Actions' current default.\n env:\n ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true\n with:\n # Fall back to default path when triggered directly (not via workflow_call)\n # because inputs.* defaults only apply on workflow_call events.\n configuration-path: ${{ inputs.configuration-path || '.github/labeler.yml' }}\n include-title: 1\n include-body: 0\n sync-labels: 1\n enable-versioned-regex: 0\n repo-token: ${{ github.token }}\n";
|
|
541
|
-
var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
542
|
-
var commits_default$1 = "name: Commit Standards\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n commit-standards:\n name: Run commitlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
543
|
-
var data_default$1 = "name: Structured Data Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n structured-data-validation:\n name: Run yamllint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
544
|
-
var editorconfig_default$2 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-editorconfig:\n name: Run editorconfig-checker\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
545
|
-
var markdown_default$1 = "name: lint:markdown\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-markdown:\n name: Run markdownlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
546
|
-
var unused_default$1 = "name: Dead Code Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n dead-code-analysis:\n name: Run knip\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n persist-credentials: false\n\n - uses: theholocron
|
|
525
|
+
var code_default$1$1 = "name: Static Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n static-analysis:\n name: Run eslint, actionlint and prettier\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # actionlint has no npm distribution — install the prebuilt binary via\n # the maintainer's own documented download script.\n # NOTE: unverified against a live CI run at authoring time (D12) — flag\n # here if this needs adjustment.\n - name: Install actionlint\n run: |\n bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)\n sudo mv ./actionlint /usr/local/bin/actionlint\n\n - name: Check for merge-conflict markers\n # No package distributes this as a standalone tool — a plain grep for\n # the marker lines (the same check the old bundled linter ran, D12).\n run: |\n if grep -rlnE '^(<{7}|={7}|>{7})( |$)' \\\n --exclude-dir=.git --exclude-dir=node_modules .; then\n echo \"::error::merge-conflict markers found\"\n exit 1\n fi\n\n # Problem matchers turn the tools' own output into inline annotations on the pull request's diff (the job the\n # old `annotate` task did with ReviewDog, on a second checkout). They are files of this repo, so a copy of this\n # workflow that runs where they are missing skips them. `ci/matchers/eslint.json` reads stylish output, whose\n # paths are absolute, so turbo's `<package>:<task>:` prefix does not hide them.\n - name: Annotate eslint and actionlint findings\n run: |\n for matcher in eslint actionlint; do\n if [ -f \"ci/matchers/$matcher.json\" ]; then\n echo \"::add-matcher::ci/matchers/$matcher.json\"\n fi\n done\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run eslint and actionlint\n with:\n task: lint:code\n\n # `holocron run lint:code` runs turbo, which runs each package's eslint and nothing else, so actionlint (installed\n # above) is run here, on the repo's workflows. It ran in the old `annotate` job; `!cancelled()` runs it even when\n # eslint failed, so one run shows both.\n - name: Run actionlint\n if: ${{ !cancelled() }}\n run: actionlint\n\n # prettier's check is the `format` action, not a workflow\n # of its own. It is called by the hosted reference, like the other actions (a `./` path would resolve in the\n # caller's checkout, which only holocron has).\n - uses: theholocron/holocron/ci/actions/format@ci-v1\n name: Run prettier\n";
|
|
526
|
+
var commits_default$1 = "name: Commit Standards\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n commit-standards:\n name: Run commitlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # No local equivalent (linters.ts: commitlint has no localBin — enforced\n # only at commit time via the commit-msg hook, and here in CI over the\n # PR's commit range). Not run through the holocron composite action.\n #\n # --config <resolved shared path> (config-resolution workstream, #676)\n # — falls back to commitlint's own auto-discovery of a local\n # commitlint.config.ts when the shared package's built dist/ isn't\n # present, same guard as the commit-msg hook.\n - name: Run commitlint over the PR range\n if: github.event_name == 'pull_request'\n run: |\n COMMITLINT_CONFIG=\"node_modules/@theholocron/commitlint-config/dist/index.js\"\n if [ -f \"$COMMITLINT_CONFIG\" ]; then\n pnpm exec commitlint --config \"$COMMITLINT_CONFIG\" --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n else\n pnpm exec commitlint --from \"${{ github.event.pull_request.base.sha }}\" --to \"${{ github.sha }}\"\n fi\n";
|
|
527
|
+
var data_default$1 = "name: Structured Data Validation\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n structured-data-validation:\n name: Run yamllint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # yamllint has no npm distribution — Python ships preinstalled on\n # ubuntu-latest runners.\n - name: Install yamllint\n run: pip install --user yamllint\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run yamllint\n with:\n task: lint:data\n";
|
|
528
|
+
var editorconfig_default$2 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-editorconfig:\n name: Run editorconfig-checker\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # editorconfig-checker has no npm distribution — install the prebuilt\n # binary from its release tarball (v4.0.1+ ships the binary at the\n # tarball root as `editorconfig-checker`, not `bin/ec-<os>-<arch>` —\n # confirmed against a live CI run; the old asset name/path 404s now).\n - name: Install editorconfig-checker\n run: |\n curl -sSL https://github.com/editorconfig-checker/editorconfig-checker/releases/latest/download/editorconfig-checker-linux-amd64.tar.gz \\\n | tar xz -C /usr/local/bin editorconfig-checker\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run editorconfig-checker\n with:\n task: lint:editorconfig\n";
|
|
529
|
+
var markdown_default$1 = "name: lint:markdown\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n lint-markdown:\n name: Run markdownlint\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run markdownlint\n with:\n task: lint:markdown\n";
|
|
530
|
+
var unused_default$1 = "name: Dead Code Analysis\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n dead-code-analysis:\n name: Run knip\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run knip\n with:\n task: lint:unused\n";
|
|
547
531
|
var mark_stale_default$1 = "name: Stale\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n days-before-stale:\n description: Days of inactivity before an issue or PR is marked stale (applies to both unless type-specific value is set)\n type: number\n required: false\n default: 30\n days-before-close:\n description: Days after stale label before closing (applies to both unless type-specific value is set)\n type: number\n required: false\n default: 5\n days-before-issue-stale:\n description: Days of inactivity before an issue is marked stale; overrides days-before-stale when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-issue-close:\n description: Days after stale label before closing an issue; overrides days-before-close when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-pr-stale:\n description: Days of inactivity before a PR is marked stale; overrides days-before-stale when set to a non-negative value\n type: number\n required: false\n default: -1\n days-before-pr-close:\n description: Days after stale label before closing a PR; overrides days-before-close when set to a non-negative value\n type: number\n required: false\n default: -1\n exempt-issue-labels:\n description: Comma-separated labels that exempt an issue from being marked stale\n type: string\n required: false\n default: \"in-progress,wip\"\n exempt-pr-labels:\n description: Comma-separated labels that exempt a PR from being marked stale\n type: string\n required: false\n default: \"\"\n exempt-all-issue-milestones:\n description: Issues assigned to any milestone are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-pr-milestones:\n description: PRs assigned to any milestone are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-issue-projects:\n description: Issues assigned to any project are never marked stale\n type: boolean\n required: false\n default: true\n exempt-all-pr-projects:\n description: PRs assigned to any project are never marked stale\n type: boolean\n required: false\n default: true\n\njobs:\n stale:\n name: Mark stale issues and pull requests\n permissions:\n contents: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0\n name: Run Stale\n with:\n close-issue-message: >\n This issue was closed because it has been stalled for\n ${{ inputs.days-before-close }} days with no activity.\n days-before-close: ${{ inputs.days-before-close }}\n days-before-issue-close: ${{ inputs.days-before-issue-close }}\n days-before-issue-stale: ${{ inputs.days-before-issue-stale }}\n days-before-pr-close: ${{ inputs.days-before-pr-close }}\n days-before-pr-stale: ${{ inputs.days-before-pr-stale }}\n days-before-stale: ${{ inputs.days-before-stale }}\n exempt-all-issue-milestones: ${{ inputs.exempt-all-issue-milestones }}\n exempt-all-issue-projects: ${{ inputs.exempt-all-issue-projects }}\n exempt-all-pr-milestones: ${{ inputs.exempt-all-pr-milestones }}\n exempt-all-pr-projects: ${{ inputs.exempt-all-pr-projects }}\n exempt-issue-labels: ${{ inputs.exempt-issue-labels }}\n exempt-pr-labels: ${{ inputs.exempt-pr-labels }}\n stale-issue-label: wontfix\n stale-issue-message: >\n This issue is stale because it has been open ${{ inputs.days-before-stale }}\n days with no activity. Remove the stale label or comment, or this will be\n closed in ${{ inputs.days-before-close }} days.\n stale-pr-label: wontfix\n stale-pr-message: >\n This PR is stale because it has been open ${{ inputs.days-before-stale }}\n days with no activity. Remove the stale label or comment, or this will be\n closed in ${{ inputs.days-before-close }} days.\n";
|
|
548
|
-
var bundle_default$1 = "name: Audit the Bundle Size\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_CODECOV_UPLOAD_TOKEN:\n description: The Codecov upload token. Read first; the CODECOV_TOKEN secret is the fallback.\n required: false\n CODECOV_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n bundle-size:\n name: Upload bundle stats to Codecov\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by the bundle-stats uploader inside `holocron run build`.\n CODECOV_TOKEN: ${{ secrets.HOLOCRON_CODECOV_UPLOAD_TOKEN || secrets.CODECOV_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
549
|
-
var docs_default$1$1 = "name: Measure Documentation Coverage\n\n# Doc-comment coverage of the public API (#1368), measured with the repo's TypeDoc by `holocron probe docs coverage`\n# and uploaded to Codecov as the `documentation` flag (`--lcov`). The patch and project percentages show on every PR\n# next to the test coverage as `codecov/patch/documentation` and `codecov/project/documentation`, and Codecov fails\n# the patch status when a PR adds or changes an exported function, class, interface, type, constant or member of one\n# without a doc comment; old undocumented exports do not count against a PR. Pushes to the default branch upload it\n# too, so a PR has a base report to compare against.\n#\n# The gate is Codecov's `codecov/patch/documentation` (`extraRequiredChecks` in holocron.config.ts), not this job's own\n# check, which only measures and uploads. `holocron probe docs patch` stays in the CLI to run before pushing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n measure-docs:\n name: Measure documentation coverage\n permissions:\n contents: read\n # The Codecov upload authenticates with the job's OIDC token.\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
550
|
-
var open_incident_default$1 = "name: Open incident\n\n# Opens an incident on the status page from a manual run, for a phone or another system (#2591, spec\n# `tech-open-status-page-incidents`). It runs `holocron new incident --yes` with the inputs below and prints the incident's\n# id in the job summary, which `holocron update incident` and `holocron close incident` take. `sync-incidents` then\n# mirrors the incident to Discord on its next run.\n#\n# It writes to a live, public page with the Checkly key, so it runs only from the default branch itself (the full ref, so a\n# tag named like the branch does not count): a dispatch from another ref could carry a changed copy of this file that\n# prints the key. The key is in the environment of the one step that opens the incident, not of the checkout, the setup\n# action or the build. Anyone who can dispatch workflows in the repository\n# can run it, which is the maintainer alone today; an Environment with required reviewers is the next step when that\n# changes. Every input goes in through `env`, never into the script text, so a title cannot inject a command.\n#\n# It needs `HOLOCRON_CHECKLY_TOKEN` in the `ci` layer, the key `sync-incidents` already holds (it can write; no narrower\n# key is available). Without it the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n title:\n description: The incident's name, at most 255 characters.\n type: string\n required: true\n page:\n description: The declared status page, when several are declared.\n type: string\n required: false\n default: \"\"\n status:\n description: The status the opening update carries (investigating, identified or monitoring).\n type: string\n required: false\n default: investigating\n components:\n description: Components to mark, one <name>=<impact> per line (impact is maintenance, degraded, partial or major).\n type: string\n required: false\n default: \"\"\n message:\n description: What the opening update says; empty is a line for the status.\n type: string\n required: false\n default: \"\"\n notify:\n description: Tell the page's subscribers.\n type: boolean\n required: false\n default: true\n secrets:\n HOLOCRON_CHECKLY_TOKEN:\n description: The Checkly API key that writes the status page's incidents. Without it the job warns and does nothing.\n required: false\n\njobs:\n open-incident:\n name: Open a status page incident\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)\n # One run at a time. GitHub keeps one running and one pending run per group, so a third dispatch while one is running\n # replaces the pending one: open incidents one at a time, and look at the status page if a run shows as cancelled.\n concurrency:\n group: open-incident\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n env:\n # Only whether the key is set is at job scope; the key itself is in the one step that opens the incident, so the\n # checkout, the setup action and the build never see it.\n HAS_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN != '' }}\n TITLE: ${{ inputs.title }}\n PAGE: ${{ inputs.page }}\n STATUS: ${{ inputs.status }}\n COMPONENTS: ${{ inputs.components }}\n MESSAGE: ${{ inputs.message }}\n NOTIFY: ${{ inputs.notify && 'true' || 'false' }}\n steps:\n - name: Warn that the token is missing\n if: env.HAS_TOKEN != 'true'\n run: |\n echo \"::warning::HOLOCRON_CHECKLY_TOKEN is not set, so no incident was opened. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HAS_TOKEN == 'true'\n\n - uses: theholocron
|
|
551
|
-
var preview_specs_default$1 = "#\n# Makes the forum post for a spec or ADR while its pull request is still open (#1600, spec\n# `tech-specs-discussion-threads`), instead of waiting for the file to land on `alpha`. It runs `holocron sync specs` with\n# `--files` (only the spec and ADR files this pull request changes, so a stale branch cannot retag the posts of files it\n# does not touch) and `--pr` (the post names this pull request). Everything the command edits stays in this checkout and\n# is thrown away: the post's address reaches the file after the merge, when the `sync-specs` task finds the post\n# by the path it records and links it through its sync pull request.\n#\n# - Only for a pull request from this repository: a post carries text the author wrote, and a fork gets no secrets.\n# - Only when the pull request changes a spec or an ADR.\n# - When the pull request is CLOSED WITHOUT MERGING, its posts are tagged `withdrawn` and closed (#1653,\n# `sync specs --withdraw`); reopening it, or the same file coming back in a new pull request, puts the file's own status\n# back on the post and reopens it. A merged pull request does nothing here. Nothing from a closed pull request's head\n# runs with the bot token: that event checks out and builds the BASE branch, and takes only the list of paths from the\n# pull request through the API.\n# - It shares the `spec-discussions` concurrency group with the `sync-specs` task, so a post is never made twice\n# by two runs at once; the post is also found by its path before it is made, so a rerun is safe.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN`; without it the job warns and does nothing.\n\nname: Preview Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n\njobs:\n preview-specs:\n name: Sync spec discussions for the pull request\n permissions:\n contents: read\n pull-requests: read\n # Shared with `sync-specs`, so a post is never made twice by two runs at once.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged == false)\n runs-on: ubuntu-latest\n timeout-minutes: 20\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n BASE_REF: ${{ github.event.pull_request.base.sha }}\n PR_NUMBER: ${{ github.event.pull_request.number }}\n WITHDRAW: ${{ github.event.action == 'closed' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussion was made for this pull request. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the pull request (the base branch, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n # A closed pull request is never checked out: its head is not needed beyond the list of paths, and the bot token\n # must not run its code. The base branch's tip is trusted code.\n ref: ${{ github.event.action == 'closed' && github.event.pull_request.base.ref || '' }}\n # The whole history: a spec is numbered by when its file was first committed, and the base is needed to see\n # which files this pull request changes.\n fetch-depth: 0\n\n - name: List the specs and ADRs this pull request changes\n id: files\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n env:\n GH_TOKEN: ${{ github.token }}\n REPO: ${{ github.repository }}\n run: |\n # Added or modified, not deleted: a file that is gone has nothing to post.\n if [ \"$WITHDRAW\" = \"true\" ]; then\n # The head is not checked out, so the pull request's paths come from the API (names only, and only those of a\n # plain shape, since the list becomes arguments).\n files=$(gh api --paginate \"repos/$REPO/pulls/$PR_NUMBER/files\" --jq '.[] | select(.status != \"removed\") | .filename' \\\n | grep -E '^(\\.notes/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/specifications/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/decisions/[A-Za-z0-9._-]+\\.md)$' \\\n | tr '\\n' ' ' || true)\n else\n files=$(git diff --name-only --diff-filter=AM \"$BASE_REF\"...HEAD -- '.notes/*.spec.md' 'docs/wiki/specifications/*.spec.md' 'docs/wiki/decisions/*.md' | tr '\\n' ' ')\n fi\n echo \"list=$files\" >> \"$GITHUB_OUTPUT\"\n if [ -z \"$files\" ]; then echo \"No spec or ADR is added or changed here.\"; fi\n\n - uses: theholocron
|
|
552
|
-
var preview_default$1 = "name: Preview\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n name:\n description: Repo name prefix used to filter the docs site package (<name>-site); omit to run pnpm -C docs run build-docs\n required: false\n type: string\n default: \"\"\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n cloudflare-project:\n description: >\n Cloudflare Pages project name. Falls back to the CLOUDFLARE_PAGES_PROJECT\n org variable (filled from the 1Password sync) when omitted — set that variable once and all repos get previews\n without per-repo config.\n required: false\n type: string\n default: \"\"\n\njobs:\n deploy-preview:\n name: Preview\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Build workspace dependencies\n # The docs site imports workspace packages (e.g. a shared theme) via\n # `workspace:*` — its exports map points at dist/, which doesn't\n # exist until something builds it. Nothing else in this job does,\n # so without this step Vite fails to resolve the import entirely.\n if: ${{ inputs.type == 'docs' }}\n run: pnpm run build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name != '' }}\n env:\n SITE_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$SITE_NAME\"-site build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name == '' }}\n run: pnpm -C docs run build-docs\n\n - name: Build Storybook projects\n if: ${{ inputs.storybook-projects != '[]' }}\n env:\n PROJECTS: ${{ inputs.storybook-projects }}\n run: |\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n pnpm -C \"$workingDir\" build:storybook\n done\n\n - name: Build Storybook\n if: ${{ inputs.type == 'storybook' && inputs.storybook-projects == '[]' }}\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n run: pnpm run \"$BUILD_SCRIPT\"\n\n - name: Assemble site\n env:\n DEPLOY_TYPE: ${{ inputs.type }}\n SITE_NAME: ${{ inputs.name }}\n PROJECTS: ${{ inputs.storybook-projects }}\n STORYBOOK_OUTPUT_DIR: ${{ inputs.output-dir }}\n run: |\n mkdir -p _site\n if [ \"$DEPLOY_TYPE\" = \"docs\" ]; then\n if [ -n \"$SITE_NAME\" ]; then\n # Site built with base: /<name>/ — nest under _site/<name>/ so asset\n # paths match (/name/_astro/... → served at /name/_astro/...).\n mkdir -p \"_site/${SITE_NAME}\"\n cp -r docs/dist/. \"_site/${SITE_NAME}/\"\n # Redirect root to the base path so the preview URL lands correctly.\n printf \"/ /%s/ 301\\n\" \"$SITE_NAME\" > _site/_redirects\n else\n cp -r docs/dist/. _site/\n fi\n fi\n if [ \"$PROJECTS\" != \"[]\" ]; then\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n name=$(echo \"$project\" | jq -r '.name // \"\"')\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n outputDir=$(echo \"$project\" | jq -r '.outputDir // \"storybook-static\"')\n if [ -n \"$name\" ]; then\n target=\"_site/sandbox/${name}\"\n else\n target=\"_site/sandbox\"\n fi\n mkdir -p \"$target\"\n cp -r \"${workingDir}/${outputDir}/.\" \"$target/\"\n done\n elif [ \"$DEPLOY_TYPE\" = \"storybook\" ]; then\n mkdir -p _site/sandbox\n cp -r \"${STORYBOOK_OUTPUT_DIR}/.\" _site/sandbox/\n fi\n\n - name: Install Wrangler\n # The action's install step runs npm/pnpm in the repo root; pnpm fails\n # because it rejects adding to a workspace root without -w, and npm fails\n # because package.json contains pnpm catalog: references it cannot parse.\n # Pre-installing from /tmp (no package.json) lets the action find wrangler\n # already on PATH and skip its own install entirely.\n working-directory: /tmp\n run: npm install -g wrangler@4\n\n - name: Warn when the Cloudflare account id is missing\n # The deploy below needs it. It is an organization variable that `holocron sync secrets` writes from\n # the 1Password Environment named by `repo.variables.sync` in .holocron/repo.ts.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The Pages deploy needs it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3\n id: deploy\n name: Deploy to Cloudflare Pages\n # Skip when neither the per-repo input nor the org variable is set.\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n with:\n apiToken: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n accountId: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n packageManager: npm\n command: >-\n pages deploy _site\n --project-name ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n --branch ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n --commit-dirty=true\n\n - name: Report preview URL\n if: ${{ steps.deploy.outputs.pages-deployment-alias-url != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n ALIAS: ${{ steps.deploy.outputs.pages-deployment-alias-url }}\n SITE_NAME: ${{ inputs.name }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n run: |\n PREVIEW_URL=\"${ALIAS%/}${SITE_NAME:+/${SITE_NAME}}/\"\n # GITHUB_HEAD_REF is the PR branch name — links the deployment to this PR's sidebar widget.\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"%s\",\"description\":\"Cloudflare Pages\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\" \"${PROJECT} (Preview)\")\n DEPLOY_ID=$(echo \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"${PREVIEW_URL}\"\n\n cleanup:\n name: Clean up Preview\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - name: Warn when the Cloudflare account id is missing\n # Without it the request below cannot find the preview deployments, so closing the PR leaves them behind.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The preview deployments cannot be deleted without it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - name: Delete Cloudflare Pages deployments for branch\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n env:\n CLOUDFLARE_API_TOKEN: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n CLOUDFLARE_ACCOUNT_ID: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n BRANCH: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n DEPLOYMENTS=$(curl -s \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n | jq -r --arg b \"$BRANCH\" \\\n '.result[] | select(.deployment_trigger.metadata.branch == $b) | .id')\n\n if [ -z \"$DEPLOYMENTS\" ]; then\n echo \"No deployments found for branch ${BRANCH} — nothing to clean up.\"\n exit 0\n fi\n\n for id in $DEPLOYMENTS; do\n echo \"Deleting CF Pages deployment: $id\"\n curl -s -X DELETE \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments/${id}?force=true\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | jq -r 'if .success then \" ✓ deleted\" else \" ✗ \\(.errors[0].message)\" end'\n done\n\n # Mark the GitHub Deployment environment as inactive.\n ENV_NAME=\"${PROJECT} (Preview)\"\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n | jq -r \".[] | select(.environment == \\\"${ENV_NAME}\\\") | .id\" \\\n | while read -r deploy_id; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive 2>/dev/null || true\n done\n";
|
|
532
|
+
var bundle_default$1 = "name: Audit the Bundle Size\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_CODECOV_UPLOAD_TOKEN:\n description: The Codecov upload token. Read first; the CODECOV_TOKEN secret is the fallback.\n required: false\n CODECOV_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n bundle-size:\n name: Upload bundle stats to Codecov\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by the bundle-stats uploader inside `holocron run build`.\n CODECOV_TOKEN: ${{ secrets.HOLOCRON_CODECOV_UPLOAD_TOKEN || secrets.CODECOV_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Build and upload bundle stats\n with:\n task: build\n";
|
|
533
|
+
var docs_default$1$1 = "name: Measure Documentation Coverage\n\n# Doc-comment coverage of the public API (#1368), measured with the repo's TypeDoc by `holocron probe docs coverage`\n# and uploaded to Codecov as the `documentation` flag (`--lcov`). The patch and project percentages show on every PR\n# next to the test coverage as `codecov/patch/documentation` and `codecov/project/documentation`, and Codecov fails\n# the patch status when a PR adds or changes an exported function, class, interface, type, constant or member of one\n# without a doc comment; old undocumented exports do not count against a PR. Pushes to the default branch upload it\n# too, so a PR has a base report to compare against.\n#\n# The gate is Codecov's `codecov/patch/documentation` (`extraRequiredChecks` in holocron.config.ts), not this job's own\n# check, which only measures and uploads. `holocron probe docs patch` stays in the CLI to run before pushing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n measure-docs:\n name: Measure documentation coverage\n permissions:\n contents: read\n # The Codecov upload authenticates with the job's OIDC token.\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # One TypeDoc pass over every package writes the report for the upload below. It does not fail on an\n # undocumented export: the Codecov status does.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Measure the documentation coverage\n with:\n command: probe docs coverage\n args: --lcov coverage/docs.lcov\n\n # A pull request from a fork has no OIDC token to upload with, so Codecov has nothing to gate it on.\n - name: Upload the documentation coverage to Codecov\n if: >-\n ${{ !cancelled() && hashFiles('coverage/docs.lcov') != '' &&\n (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) }}\n uses: theholocron/holocron/ci/actions/codecov-upload@ci-v1\n with:\n uploads: '[{\"flag\":\"documentation\",\"files\":\"coverage/docs.lcov\"}]'\n";
|
|
534
|
+
var open_incident_default$1 = "name: Open incident\n\n# Opens an incident on the status page from a manual run, for a phone or another system (#2591, spec\n# `tech-open-status-page-incidents`). It runs `holocron new incident --yes` with the inputs below and prints the incident's\n# id in the job summary, which `holocron update incident` and `holocron close incident` take. `sync-incidents` then\n# mirrors the incident to Discord on its next run.\n#\n# It writes to a live, public page with the Checkly key, so it runs only from the default branch itself (the full ref, so a\n# tag named like the branch does not count): a dispatch from another ref could carry a changed copy of this file that\n# prints the key. The key is in the environment of the one step that opens the incident, not of the checkout, the setup\n# action or the build. Anyone who can dispatch workflows in the repository\n# can run it, which is the maintainer alone today; an Environment with required reviewers is the next step when that\n# changes. Every input goes in through `env`, never into the script text, so a title cannot inject a command.\n#\n# It needs `HOLOCRON_CHECKLY_TOKEN` in the `ci` layer, the key `sync-incidents` already holds (it can write; no narrower\n# key is available). Without it the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n title:\n description: The incident's name, at most 255 characters.\n type: string\n required: true\n page:\n description: The declared status page, when several are declared.\n type: string\n required: false\n default: \"\"\n status:\n description: The status the opening update carries (investigating, identified or monitoring).\n type: string\n required: false\n default: investigating\n components:\n description: Components to mark, one <name>=<impact> per line (impact is maintenance, degraded, partial or major).\n type: string\n required: false\n default: \"\"\n message:\n description: What the opening update says; empty is a line for the status.\n type: string\n required: false\n default: \"\"\n notify:\n description: Tell the page's subscribers.\n type: boolean\n required: false\n default: true\n secrets:\n HOLOCRON_CHECKLY_TOKEN:\n description: The Checkly API key that writes the status page's incidents. Without it the job warns and does nothing.\n required: false\n\njobs:\n open-incident:\n name: Open a status page incident\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)\n # One run at a time. GitHub keeps one running and one pending run per group, so a third dispatch while one is running\n # replaces the pending one: open incidents one at a time, and look at the status page if a run shows as cancelled.\n concurrency:\n group: open-incident\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n env:\n # Only whether the key is set is at job scope; the key itself is in the one step that opens the incident, so the\n # checkout, the setup action and the build never see it.\n HAS_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN != '' }}\n TITLE: ${{ inputs.title }}\n PAGE: ${{ inputs.page }}\n STATUS: ${{ inputs.status }}\n COMPONENTS: ${{ inputs.components }}\n MESSAGE: ${{ inputs.message }}\n NOTIFY: ${{ inputs.notify && 'true' || 'false' }}\n steps:\n - name: Warn that the token is missing\n if: env.HAS_TOKEN != 'true'\n run: |\n echo \"::warning::HOLOCRON_CHECKLY_TOKEN is not set, so no incident was opened. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HAS_TOKEN == 'true'\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: env.HAS_TOKEN == 'true'\n\n - name: Build the CLI\n if: env.HAS_TOKEN == 'true'\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Open the incident\n if: env.HAS_TOKEN == 'true'\n env:\n HOLOCRON_CHECKLY_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN }}\n run: |\n # A title that starts with a dash would be read as an option, so it is refused here.\n case \"$TITLE\" in\n -*)\n echo \"::error::The title must not start with a dash.\"\n exit 1\n ;;\n esac\n args=(new incident \"$TITLE\" --yes --status \"$STATUS\")\n if [ -n \"$PAGE\" ]; then args+=(--page \"$PAGE\"); fi\n if [ -n \"$COMPONENTS\" ]; then args+=(--component \"$COMPONENTS\"); fi\n if [ -n \"$MESSAGE\" ]; then args+=(--message \"$MESSAGE\"); fi\n if [ \"$NOTIFY\" = \"false\" ]; then args+=(--no-notify); fi\n # The output goes in the job summary whether the run worked or not; its exit status is the step's.\n code=0\n out=$(node cli/cli/dist/cli.mjs \"${args[@]}\" 2>&1) || code=$?\n fence=$(printf '\\140\\140\\140')\n printf '### Open incident\\n\\n%s\\n%s\\n%s\\n' \"$fence\" \"$out\" \"$fence\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n exit \"$code\"\n";
|
|
535
|
+
var preview_specs_default$1 = "#\n# Makes the forum post for a spec or ADR while its pull request is still open (#1600, spec\n# `tech-specs-discussion-threads`), instead of waiting for the file to land on `alpha`. It runs `holocron sync specs` with\n# `--files` (only the spec and ADR files this pull request changes, so a stale branch cannot retag the posts of files it\n# does not touch) and `--pr` (the post names this pull request). Everything the command edits stays in this checkout and\n# is thrown away: the post's address reaches the file after the merge, when the `sync-specs` task finds the post\n# by the path it records and links it through its sync pull request.\n#\n# - Only for a pull request from this repository: a post carries text the author wrote, and a fork gets no secrets.\n# - Only when the pull request changes a spec or an ADR.\n# - When the pull request is CLOSED WITHOUT MERGING, its posts are tagged `withdrawn` and closed (#1653,\n# `sync specs --withdraw`); reopening it, or the same file coming back in a new pull request, puts the file's own status\n# back on the post and reopens it. A merged pull request does nothing here. Nothing from a closed pull request's head\n# runs with the bot token: that event checks out and builds the BASE branch, and takes only the list of paths from the\n# pull request through the API.\n# - It shares the `spec-discussions` concurrency group with the `sync-specs` task, so a post is never made twice\n# by two runs at once; the post is also found by its path before it is made, so a rerun is safe.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN`; without it the job warns and does nothing.\n\nname: Preview Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n\njobs:\n preview-specs:\n name: Sync spec discussions for the pull request\n permissions:\n contents: read\n pull-requests: read\n # Shared with `sync-specs`, so a post is never made twice by two runs at once.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n if: github.repository == format('{0}/holocron', github.repository_owner) && github.event.pull_request.head.repo.full_name == github.repository && (github.event.action != 'closed' || github.event.pull_request.merged == false)\n runs-on: ubuntu-latest\n timeout-minutes: 20\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n BASE_REF: ${{ github.event.pull_request.base.sha }}\n PR_NUMBER: ${{ github.event.pull_request.number }}\n WITHDRAW: ${{ github.event.action == 'closed' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussion was made for this pull request. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the pull request (the base branch, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n # A closed pull request is never checked out: its head is not needed beyond the list of paths, and the bot token\n # must not run its code. The base branch's tip is trusted code.\n ref: ${{ github.event.action == 'closed' && github.event.pull_request.base.ref || '' }}\n # The whole history: a spec is numbered by when its file was first committed, and the base is needed to see\n # which files this pull request changes.\n fetch-depth: 0\n\n - name: List the specs and ADRs this pull request changes\n id: files\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n env:\n GH_TOKEN: ${{ github.token }}\n REPO: ${{ github.repository }}\n run: |\n # Added or modified, not deleted: a file that is gone has nothing to post.\n if [ \"$WITHDRAW\" = \"true\" ]; then\n # The head is not checked out, so the pull request's paths come from the API (names only, and only those of a\n # plain shape, since the list becomes arguments).\n files=$(gh api --paginate \"repos/$REPO/pulls/$PR_NUMBER/files\" --jq '.[] | select(.status != \"removed\") | .filename' \\\n | grep -E '^(\\.notes/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/specifications/[A-Za-z0-9._-]+\\.spec\\.md|docs/wiki/decisions/[A-Za-z0-9._-]+\\.md)$' \\\n | tr '\\n' ' ' || true)\n else\n files=$(git diff --name-only --diff-filter=AM \"$BASE_REF\"...HEAD -- '.notes/*.spec.md' 'docs/wiki/specifications/*.spec.md' 'docs/wiki/decisions/*.md' | tr '\\n' ' ')\n fi\n echo \"list=$files\" >> \"$GITHUB_OUTPUT\"\n if [ -z \"$files\" ]; then echo \"No spec or ADR is added or changed here.\"; fi\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions for these files (withdraw them, when it was closed)\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && steps.files.outputs.list != ''\n env:\n FILES: ${{ steps.files.outputs.list }}\n run: |\n # The list is file names from this repository's own pull request; word splitting is what turns it into arguments.\n # shellcheck disable=SC2086\n if [ \"$WITHDRAW\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --withdraw --files $FILES\n else\n node cli/cli/dist/cli.mjs sync specs --pr \"$PR_NUMBER\" --files $FILES\n fi\n";
|
|
536
|
+
var preview_default$1 = "name: Preview\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n type:\n description: \"Type of deployment: docs or storybook\"\n required: true\n type: string\n name:\n description: Repo name prefix used to filter the docs site package (<name>-site); omit to run pnpm -C docs run build-docs\n required: false\n type: string\n default: \"\"\n storybook-projects:\n description: >\n JSON array of { \"name\"?, \"workingDir\", \"outputDir\"? } objects for storybook deploys.\n Each is built via `pnpm -C <workingDir> build:storybook`. If \"name\" is provided the\n output is placed under `sandbox/<name>/`; omit \"name\" for single-repo deploys and the\n output lands directly in `sandbox/`.\n type: string\n required: false\n default: \"[]\"\n build-script:\n description: pnpm script that builds the Storybook static output (single storybook, type:storybook only)\n type: string\n required: false\n default: build:storybook\n output-dir:\n description: Directory where Storybook writes its static output (single storybook, type:storybook only)\n type: string\n required: false\n default: storybook-static\n cloudflare-project:\n description: >\n Cloudflare Pages project name. Falls back to the CLOUDFLARE_PAGES_PROJECT\n org variable (filled from the 1Password sync) when omitted — set that variable once and all repos get previews\n without per-repo config.\n required: false\n type: string\n default: \"\"\n\njobs:\n deploy-preview:\n name: Preview\n if: ${{ github.event.action != 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Build workspace dependencies\n # The docs site imports workspace packages (e.g. a shared theme) via\n # `workspace:*` — its exports map points at dist/, which doesn't\n # exist until something builds it. Nothing else in this job does,\n # so without this step Vite fails to resolve the import entirely.\n if: ${{ inputs.type == 'docs' }}\n run: pnpm run build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name != '' }}\n env:\n SITE_NAME: ${{ inputs.name }}\n run: pnpm --filter @theholocron/\"$SITE_NAME\"-site build\n\n - name: Build docs site\n if: ${{ inputs.type == 'docs' && inputs.name == '' }}\n run: pnpm -C docs run build-docs\n\n - name: Build Storybook projects\n if: ${{ inputs.storybook-projects != '[]' }}\n env:\n PROJECTS: ${{ inputs.storybook-projects }}\n run: |\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n pnpm -C \"$workingDir\" build:storybook\n done\n\n - name: Build Storybook\n if: ${{ inputs.type == 'storybook' && inputs.storybook-projects == '[]' }}\n env:\n BUILD_SCRIPT: ${{ inputs.build-script }}\n run: pnpm run \"$BUILD_SCRIPT\"\n\n - name: Assemble site\n env:\n DEPLOY_TYPE: ${{ inputs.type }}\n SITE_NAME: ${{ inputs.name }}\n PROJECTS: ${{ inputs.storybook-projects }}\n STORYBOOK_OUTPUT_DIR: ${{ inputs.output-dir }}\n run: |\n mkdir -p _site\n if [ \"$DEPLOY_TYPE\" = \"docs\" ]; then\n if [ -n \"$SITE_NAME\" ]; then\n # Site built with base: /<name>/ — nest under _site/<name>/ so asset\n # paths match (/name/_astro/... → served at /name/_astro/...).\n mkdir -p \"_site/${SITE_NAME}\"\n cp -r docs/dist/. \"_site/${SITE_NAME}/\"\n # Redirect root to the base path so the preview URL lands correctly.\n printf \"/ /%s/ 301\\n\" \"$SITE_NAME\" > _site/_redirects\n else\n cp -r docs/dist/. _site/\n fi\n fi\n if [ \"$PROJECTS\" != \"[]\" ]; then\n echo \"$PROJECTS\" | jq -c '.[]' | while IFS= read -r project; do\n name=$(echo \"$project\" | jq -r '.name // \"\"')\n workingDir=$(echo \"$project\" | jq -r '.workingDir')\n outputDir=$(echo \"$project\" | jq -r '.outputDir // \"storybook-static\"')\n if [ -n \"$name\" ]; then\n target=\"_site/sandbox/${name}\"\n else\n target=\"_site/sandbox\"\n fi\n mkdir -p \"$target\"\n cp -r \"${workingDir}/${outputDir}/.\" \"$target/\"\n done\n elif [ \"$DEPLOY_TYPE\" = \"storybook\" ]; then\n mkdir -p _site/sandbox\n cp -r \"${STORYBOOK_OUTPUT_DIR}/.\" _site/sandbox/\n fi\n\n - name: Install Wrangler\n # The action's install step runs npm/pnpm in the repo root; pnpm fails\n # because it rejects adding to a workspace root without -w, and npm fails\n # because package.json contains pnpm catalog: references it cannot parse.\n # Pre-installing from /tmp (no package.json) lets the action find wrangler\n # already on PATH and skip its own install entirely.\n working-directory: /tmp\n run: npm install -g wrangler@4\n\n - name: Warn when the Cloudflare account id is missing\n # The deploy below needs it. It is an organization variable that `holocron sync secrets` writes from\n # the 1Password Environment named by `repo.variables.sync` in .holocron/repo.ts.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The Pages deploy needs it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3\n id: deploy\n name: Deploy to Cloudflare Pages\n # Skip when neither the per-repo input nor the org variable is set.\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n with:\n apiToken: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n accountId: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n packageManager: npm\n command: >-\n pages deploy _site\n --project-name ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n --branch ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n --commit-dirty=true\n\n - name: Report preview URL\n if: ${{ steps.deploy.outputs.pages-deployment-alias-url != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n ALIAS: ${{ steps.deploy.outputs.pages-deployment-alias-url }}\n SITE_NAME: ${{ inputs.name }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n run: |\n PREVIEW_URL=\"${ALIAS%/}${SITE_NAME:+/${SITE_NAME}}/\"\n # GITHUB_HEAD_REF is the PR branch name — links the deployment to this PR's sidebar widget.\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"%s\",\"description\":\"Cloudflare Pages\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\" \"${PROJECT} (Preview)\")\n DEPLOY_ID=$(echo \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"${PREVIEW_URL}\"\n\n cleanup:\n name: Clean up Preview\n if: ${{ github.event.action == 'closed' }}\n runs-on: ubuntu-latest\n permissions:\n contents: read\n deployments: write\n pull-requests: write\n steps:\n - name: Warn when the Cloudflare account id is missing\n # Without it the request below cannot find the preview deployments, so closing the PR leaves them behind.\n if: ${{ (inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '') && (vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID) == '' }}\n run: echo \"::warning title=CLOUDFLARE_ACCOUNT_ID is not set::The preview deployments cannot be deleted without it. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n\n - name: Delete Cloudflare Pages deployments for branch\n if: ${{ inputs.cloudflare-project != '' || (vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT) != '' }}\n env:\n CLOUDFLARE_API_TOKEN: ${{ secrets.HOLOCRON_CLOUDFLARE_TOKEN || secrets.CLOUDFLARE_API_TOKEN }}\n CLOUDFLARE_ACCOUNT_ID: ${{ vars.HOLOCRON_CLOUDFLARE_ACCOUNT_ID || vars.CLOUDFLARE_ACCOUNT_ID }}\n PROJECT: ${{ inputs.cloudflare-project || vars.HOLOCRON_CLOUDFLARE_PAGES_PROJECT || vars.CLOUDFLARE_PAGES_PROJECT }}\n BRANCH: ${{ github.event.repository.name }}-pr-${{ github.event.pull_request.number }}\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n DEPLOYMENTS=$(curl -s \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" \\\n | jq -r --arg b \"$BRANCH\" \\\n '.result[] | select(.deployment_trigger.metadata.branch == $b) | .id')\n\n if [ -z \"$DEPLOYMENTS\" ]; then\n echo \"No deployments found for branch ${BRANCH} — nothing to clean up.\"\n exit 0\n fi\n\n for id in $DEPLOYMENTS; do\n echo \"Deleting CF Pages deployment: $id\"\n curl -s -X DELETE \\\n \"https://api.cloudflare.com/client/v4/accounts/${CLOUDFLARE_ACCOUNT_ID}/pages/projects/${PROJECT}/deployments/${id}?force=true\" \\\n -H \"Authorization: Bearer ${CLOUDFLARE_API_TOKEN}\" | jq -r 'if .success then \" ✓ deleted\" else \" ✗ \\(.errors[0].message)\" end'\n done\n\n # Mark the GitHub Deployment environment as inactive.\n ENV_NAME=\"${PROJECT} (Preview)\"\n gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n | jq -r \".[] | select(.environment == \\\"${ENV_NAME}\\\") | .id\" \\\n | while read -r deploy_id; do\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${deploy_id}/statuses\" \\\n --method POST --field state=inactive 2>/dev/null || true\n done\n";
|
|
553
537
|
var publish_wiki_default$1 = "name: Wiki\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n fern-version:\n description: >\n Fern CLI version to install. Pin this to avoid breaking changes when\n Fern updates their config schema.\n type: string\n required: false\n default: \"5.114.1\"\n preview:\n description: >\n When true, publishes a preview instead of production.\n Requires preview-id to be set.\n type: boolean\n required: false\n default: false\n preview-id:\n description: >\n Stable ID for the preview build. Use the PR number (e.g. \"pr-123\")\n so the same preview URL is reused on every push to the branch.\n type: string\n required: false\n default: \"\"\n fern-org:\n description: >\n DEPRECATED — the preview URL is now read from Fern's own output.\n Kept as a fallback for building the URL when that parse fails, and so\n existing callers do not error.\n type: string\n required: false\n default: \"\"\n base-path:\n description: >\n DEPRECATED — see fern-org. Basepath appended to the fallback preview\n URL (e.g. \"holocron\" for multi-source routing).\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_FERN_TOKEN:\n required: false\n FERN_TOKEN:\n required: false\n\njobs:\n publish:\n name: Publish to Fern\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n deployments: write\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - name: Install Fern CLI\n run: npm install -g \"fern-api@$FERN_VERSION\"\n env:\n FERN_VERSION: ${{ inputs.fern-version }}\n\n - name: Publish docs\n if: ${{ !inputs.preview }}\n run: fern generate --docs\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n\n - name: Preview docs\n id: preview\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n FERN_TOKEN: ${{ secrets.HOLOCRON_FERN_TOKEN || secrets.FERN_TOKEN }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n run: |\n out=$(fern generate --docs --preview --id \"$PREVIEW_ID\" 2>&1) || { printf '%s\\n' \"$out\"; exit 1; }\n printf '%s\\n' \"$out\"\n # Fern prints \"Published docs to https://<org>-preview-<id>.docs.buildwithfern.com/<path>\"\n url=$(printf '%s\\n' \"$out\" | grep -oiE 'https://[a-z0-9.-]+\\.docs\\.buildwithfern\\.com[^ )]*' | head -n1)\n echo \"url=$url\" >> \"$GITHUB_OUTPUT\"\n\n - name: Report preview URL\n if: ${{ inputs.preview && inputs.preview-id != '' }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n CAPTURED_URL: ${{ steps.preview.outputs.url }}\n FERN_ORG: ${{ inputs.fern-org }}\n PREVIEW_ID: ${{ inputs.preview-id }}\n BASE_PATH: ${{ inputs.base-path }}\n run: |\n PREVIEW_URL=\"$CAPTURED_URL\"\n if [ -z \"$PREVIEW_URL\" ] && [ -n \"$FERN_ORG\" ]; then\n PREVIEW_URL=\"https://${FERN_ORG}-preview-${PREVIEW_ID}.docs.buildwithfern.com${BASE_PATH:+/${BASE_PATH}}\"\n fi\n if [ -z \"$PREVIEW_URL\" ]; then\n echo \"::warning::no preview URL parsed from Fern output and no fern-org fallback — skipping the deployment widget\"\n exit 0\n fi\n PAYLOAD=$(printf '{\"ref\":\"%s\",\"environment\":\"wiki (Preview)\",\"description\":\"Wiki\",\"production_environment\":false,\"auto_merge\":false,\"required_contexts\":[]}' \\\n \"$GITHUB_HEAD_REF\")\n DEPLOY_ID=$(printf '%s\\n' \"$PAYLOAD\" | gh api \"repos/${GITHUB_REPOSITORY}/deployments\" \\\n --method POST --input - | jq -r '.id')\n gh api \"repos/${GITHUB_REPOSITORY}/deployments/${DEPLOY_ID}/statuses\" \\\n --method POST --field state=success --field environment_url=\"$PREVIEW_URL\"\n";
|
|
554
|
-
var reconcile_ci_default$1 = "name: Reconcile ci\n\n# The safety net of the `ci` aggregate (spec `process-sentinel-posts-ci`, SPEC-0099): runs `holocron reconcile ci`, which\n# reads each open pull request's check runs and statuses and makes `ci / Required checks` say what they call for. A\n# healthy run writes nothing. A check that was missing or wrong for longer than ten minutes means a webhook was missed:\n# the run fails, and a failed run reaches #alerts through `platform.notifications.yml`.\n#\n# It posts as Sentinel's GitHub App, with an installation token narrowed to the three permissions it needs (checks:\n# write, pull_requests: read, statuses: read), never as `GITHUB_TOKEN`: a check run belongs to the app that posted it, and\n# the ruleset will be pinned to Sentinel's app. The App's id and private key reach the job as the secrets below (`secrets:\n# inherit` passes them from the caller). The App must hold Commit statuses: read, which a person grants.\n#\n# In a repo whose `ci.aggregate` is `actions` (the default) the command posts nothing and the run is green: the Actions job\n# is the poster there. Scheduled every 15 minutes by the caller; GitHub delays and drops scheduled runs, so the heartbeat\n# is more lenient than the cron.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token posts the check (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_CI:\n description: The ping URL of the `reconcile-ci` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-ci:\n name: Bring the ci check up to date\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Two runs could post the same check twice, so a second waits for the first.\n concurrency:\n group: reconcile-ci\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n repositories: ${{ github.event.repository.name }}\n permission-checks: write\n permission-pull-requests: read\n permission-statuses: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
555
|
-
var reconcile_projects_default$1 = "name: Reconcile Projects\n\n# Keeps the project boards true to their rules (SPEC-0020, #1744): runs `holocron reconcile project`, which sets an item's\n# status from the issue's state and its \"blocked by\" links (an open blocker means blocked, no blocker left means planned,\n# a closed issue means done), then `holocron doctor project`, which reports what reconcile cannot fix.\n#\n# `GITHUB_TOKEN` cannot write an organization project, so the job mints an installation token from a GitHub App. The App\n# needs the organization permission Projects (read and write), which a person grants; its id and private key reach the job\n# as the secrets below (`secrets: inherit` passes them from the caller). The boards a repo keeps come from its own\n# `providers.projects` in holocron.config.ts, so a repo that declares none passes `doctor project` as a skip.\n#\n# Scheduled hourly by the caller. A failed run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token writes the boards (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS:\n description: The ping URL of the `reconcile-projects` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-projects:\n name: Reconcile and check the boards\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n # Two runs could set the same item twice, so a second waits for the first.\n concurrency:\n group: reconcile-projects\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n permission-organization-projects: write\n permission-issues: read\n permission-pull-requests: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
556
|
-
var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available: the built-in github.token cannot push through\n # branch protection rulesets. The checkout keeps no credential (persist-credentials: false), so\n # semantic-release pushes its tags and release commits with GITHUB_TOKEN from the step's env, and\n # `publish tag` sends that same token with its own push of the major tag (ci-v1).\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n with:\n node-version: \"26.x\"\n\n # The hosted reference, like the other actions: the action is new, so `theholocron/.github` has no copy and the reference\n # is rewritten to `theholocron/holocron/ci/actions/git-identity@ci-v1` (a `./` path would resolve in the caller's checkout).\n - uses: theholocron/.github/.github/actions/git-identity@main\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
|
|
557
|
-
var remind_doctor_default$1 = "name: Remind Doctor\n\n# A weekly nudge to run the drift check by hand (#1585). `holocron doctor notifications` compares the layout with the\n# live server and reads the Worker, the tracker and the secrets with provider tokens, which stay on a maintainer's\n# machine rather than in CI. This posts one line to #alerts, no ping, naming the command that checks and shares the\n# result. A missing webhook secret skips the post and never fails the run.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: The #alerts webhook the reminder posts to. Without it the post is skipped.\n required: false\n\njobs:\n remind-doctor:\n name: Remind to run the drift check\n permissions: {}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n steps:\n - uses: theholocron
|
|
538
|
+
var reconcile_ci_default$1 = "name: Reconcile ci\n\n# The safety net of the `ci` aggregate (spec `process-sentinel-posts-ci`, SPEC-0099): runs `holocron reconcile ci`, which\n# reads each open pull request's check runs and statuses and makes `ci / Required checks` say what they call for. A\n# healthy run writes nothing. A check that was missing or wrong for longer than ten minutes means a webhook was missed:\n# the run fails, and a failed run reaches #alerts through `platform.notifications.yml`.\n#\n# It posts as Sentinel's GitHub App, with an installation token narrowed to the three permissions it needs (checks:\n# write, pull_requests: read, statuses: read), never as `GITHUB_TOKEN`: a check run belongs to the app that posted it, and\n# the ruleset will be pinned to Sentinel's app. The App's id and private key reach the job as the secrets below (`secrets:\n# inherit` passes them from the caller). The App must hold Commit statuses: read, which a person grants.\n#\n# In a repo whose `ci.aggregate` is `actions` (the default) the command posts nothing and the run is green: the Actions job\n# is the poster there. Scheduled every 15 minutes by the caller; GitHub delays and drops scheduled runs, so the heartbeat\n# is more lenient than the cron.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token posts the check (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_CI:\n description: The ping URL of the `reconcile-ci` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-ci:\n name: Bring the ci check up to date\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Two runs could post the same check twice, so a second waits for the first.\n concurrency:\n group: reconcile-ci\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n repositories: ${{ github.event.repository.name }}\n permission-checks: write\n permission-pull-requests: read\n permission-statuses: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # The token goes in the environment, never on the command line. The `source` provider reads it as its token.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Reconcile the ci check\n id: reconcile\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile ci --max-age 10\n\n - name: List what was done\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### ci reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # Tells Checkly this run finished (#2359, the `reconcile-ci` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_CI }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_CI is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
539
|
+
var reconcile_projects_default$1 = "name: Reconcile Projects\n\n# Keeps the project boards true to their rules (SPEC-0020, #1744): runs `holocron reconcile project`, which sets an item's\n# status from the issue's state and its \"blocked by\" links (an open blocker means blocked, no blocker left means planned,\n# a closed issue means done), then `holocron doctor project`, which reports what reconcile cannot fix.\n#\n# `GITHUB_TOKEN` cannot write an organization project, so the job mints an installation token from a GitHub App. The App\n# needs the organization permission Projects (read and write), which a person grants; its id and private key reach the job\n# as the secrets below (`secrets: inherit` passes them from the caller). The boards a repo keeps come from its own\n# `providers.projects` in holocron.config.ts, so a repo that declares none passes `doctor project` as a skip.\n#\n# Scheduled hourly by the caller. A failed run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n SENTINEL_GITHUB_APP_PRIVATE_KEY:\n description: The private key of the GitHub App whose installation token writes the boards (its id is the variable SENTINEL_GITHUB_APP_ID).\n required: false\n HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS:\n description: The ping URL of the `reconcile-projects` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n reconcile-projects:\n name: Reconcile and check the boards\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n # Two runs could set the same item twice, so a second waits for the first.\n concurrency:\n group: reconcile-projects\n cancel-in-progress: false\n steps:\n - name: Generate GitHub App token\n id: app-token\n uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0\n with:\n app-id: ${{ vars.SENTINEL_GITHUB_APP_ID }}\n private-key: ${{ secrets.SENTINEL_GITHUB_APP_PRIVATE_KEY }}\n owner: ${{ github.repository_owner }}\n permission-organization-projects: write\n permission-issues: read\n permission-pull-requests: read\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n # The token goes in the environment, never on the command line.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Reconcile the boards\n id: reconcile\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: reconcile project\n\n - name: List what changed\n if: ${{ !cancelled() && steps.reconcile.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.reconcile.outputs.log-file }}\n run: |\n {\n echo \"### Project reconcile\"\n echo '```'\n cat \"$LOG_FILE\"\n echo '```'\n } >> \"$GITHUB_STEP_SUMMARY\"\n\n # What reconcile cannot fix: a board that differs from its template, a rule that is off, a missing App permission.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Check the boards\n if: ${{ !cancelled() }}\n env:\n HOLOCRON_ORG_TOKEN: ${{ steps.app-token.outputs.token }}\n with:\n command: doctor project\n\n # Tells Checkly this run finished (#2359, the `reconcile-projects` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job.\n - name: Ping the heartbeat\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_RECONCILE_PROJECTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
540
|
+
var release_default$1 = "name: Release\n\n# Semantic-release with OIDC Trusted Publishing.\n# actions/setup-node writes a default NODE_AUTH_TOKEN=${{ github.token }}\n# which shadows OIDC auth. We explicitly clear it so npm falls through to\n# the Trusted Publisher OIDC exchange.\n# The calling repo must have a .releaserc.json that configures branches,\n# plugins, and any publish options. npm@11+ is installed to support OIDC.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: >\n When true, runs semantic-release --dry-run: analyzes commits and\n previews the next release without git writes or publish. Only\n meaningful for workflow_dispatch triggers; push-triggered runs\n always run fully.\n type: boolean\n required: false\n default: false\n group:\n description: >\n Version group to release: a folder of the repo (`clients`,\n `observability`). Passed to the release config as RELEASE_GROUP, and\n scopes every tag lookup below to that group's `<group>-v*` tags, so\n releasing one group never reads another's. Empty releases the whole\n repo, with plain `v*` tags. Groups push release commits to the same\n branch, so release them one at a time (a matrix with `max-parallel: 1`);\n each run starts from the branch's current tip, not the commit that\n triggered the workflow.\n type: string\n required: false\n default: \"\"\n from-branch-tip:\n description: >\n When true, an ungrouped release starts from the branch's current tip\n instead of the commit that triggered the workflow. Set it when the\n repo-wide release runs after the version groups, whose release\n commits have moved the branch (semantic-release refuses to run\n behind its remote). A group always starts from the tip.\n type: boolean\n required: false\n default: false\n post-release:\n description: >\n When true, dispatches a readme sync broadcast after a successful\n release. Enable for packages consumed by other repos via the\n registry-doc system so downstream README installation blocks\n stay current.\n type: boolean\n required: false\n default: false\n run-build:\n description: Run `pnpm build` before releasing\n type: boolean\n required: false\n default: true\n deploy-on-release:\n description: >\n When true, runs a separate `deploy` job after a successful release\n (holocron#930): `holocron deploy on-release` deploys every workspace\n package whose `delivery.deploy` task is `with: { on: release }`, when\n the release is on its channel and changes its paths. The job is its\n own check, re-runnable on its own, and gets VERCEL_TOKEN; the release\n job never sees it. Off by default, so a repo that doesn't deploy from\n its release never exposes the token.\n type: boolean\n required: false\n default: false\n republish-tag:\n description: >\n Publish what npm lacks for an existing release instead of releasing\n (holocron#1387): the tag of the release, `<group>-v<version>` for a\n version group or `v<version>` for the rest. Set, the `release` job is\n skipped (no semantic-release, no tag, no release commit) and the\n `republish` job checks the tag out and runs `publish package\n --skip-already-published` for it. The tag must be on a release branch.\n The caller sets it from a manual run only. Empty is a normal release.\n type: string\n required: false\n default: \"\"\n exclude-groups:\n description: >\n Space-separated version groups that release on their own, left out of\n a republish of the repo-wide tag (`v<version>`). Ignored otherwise.\n type: string\n required: false\n default: \"\"\n sentry-project:\n description: >\n Sentry project slug for sourcemap upload and release creation after\n publishing. Omit to skip the Sentry release step entirely.\n type: string\n required: false\n default: \"\"\n secrets:\n HOLOCRON_RELEASE_TOKEN:\n description: >\n Fine-grained PAT (Contents + Issues + Pull requests: write) owned by\n an admin. Required when the default branch is protected by a ruleset —\n github.token cannot push through rulesets, but an admin PAT can.\n Takes priority over HOLOCRON_SYNC_TOKEN. Falls back to github.token.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: >\n Legacy alias for HOLOCRON_RELEASE_TOKEN — kept for backward compatibility.\n Prefer HOLOCRON_RELEASE_TOKEN for new repos.\n required: false\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to github.token.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when\n HOLOCRON_READ_TOKEN is not set.\n required: false\n HOLOCRON_SENTRY_RELEASE_TOKEN:\n description: The Sentry release token (sourcemaps and release creation). Read first; the SENTRY_AUTH_TOKEN secret is the fallback.\n required: false\n SENTRY_AUTH_TOKEN:\n description: >\n Sentry auth token for sourcemap upload and release creation.\n Required when sentry-project is set. Use the org-level secret.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token. Read first; the vendor-native VERCEL_TOKEN secret is the fallback.\n required: false\n VERCEL_TOKEN:\n description: >\n Vercel token for the deploy job. Only used when deploy-on-release is\n true, and only by that job.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: >\n The Holonet bot's token, for the announce job: it finds its earlier post and starts the thread. With\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES unset too, the release is not announced.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_RELEASES:\n description: The webhook of the `releases` channel, the announce job's post. Only used by that job.\n required: false\n\njobs:\n release:\n name: Semantic release\n if: ${{ inputs.republish-tag == '' }}\n permissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n outputs:\n # Read by the deploy job (holocron#930). Empty unless semantic-release\n # published: `commit` is the release commit, `previous` the commit of\n # the release before it (to diff against), `channel` the new version's\n # prerelease identifier (`alpha`), empty for a stable release (`main`).\n commit: ${{ steps.release.outputs.commit }}\n previous: ${{ steps.release.outputs.previous }}\n channel: ${{ steps.release.outputs.channel }}\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Do not cancel in-progress releases — a partial release is worse than a slow one.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n persist-credentials: false\n # A group's release commit moves the branch, so a later group's run must\n # release from the branch's current tip, not the commit that triggered the\n # workflow (semantic-release refuses to run behind its remote). Ungrouped,\n # the default (the triggering commit) is unchanged, unless `from-branch-tip`\n # says the groups ran first.\n ref: ${{ (inputs.group != '' || inputs.from-branch-tip) && github.ref || github.sha }}\n # Use HOLOCRON_RELEASE_TOKEN when available: the built-in github.token cannot push through\n # branch protection rulesets. The checkout keeps no credential (persist-credentials: false), so\n # semantic-release pushes its tags and release commits with GITHUB_TOKEN from the step's env, and\n # `publish tag` sends that same token with its own push of the major tag (ci-v1).\n token: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n\n # semantic-release 26 needs Node 26.13 or later. The frozen setup action ignores `.node-version` (its expression\n # always falls through to this input, default 22.x), so the version is passed here.\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n with:\n node-version: \"26.x\"\n\n # The hosted reference, like the other actions: the action is new, so `theholocron/.github` has no copy and the reference\n # is rewritten to `theholocron/holocron/ci/actions/git-identity@ci-v1` (a `./` path would resolve in the caller's checkout).\n - uses: theholocron/holocron/ci/actions/git-identity@ci-v1\n name: Configure git identity\n with:\n scope: global\n resolve: \"true\"\n signoff: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n # sigstore is required by libnpmpublish/provenance.js at module parse\n # time — before any config takes effect. Some npm 11.x builds stopped\n # bundling it; installing it globally into the same prefix ensures it\n # resolves regardless of npm version. (Discovered 2026-07-09.)\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n - name: Release\n id: release\n run: |\n BEFORE=$(git rev-parse HEAD)\n # A group's tags are `<group>-v<version>`; without one, the repo-wide `v<version>` tags only: a\n # `deployed/<package>` tag (the deploy step's marker) is nearer after a deploy and is not a release.\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n PREVIOUS_TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || true)\n PREVIOUS=\"\"\n if [ -n \"$PREVIOUS_TAG\" ]; then PREVIOUS=$(git rev-list -n 1 \"$PREVIOUS_TAG\"); fi\n if [ \"$DRY_RUN\" = \"true\" ]; then\n npx semantic-release --dry-run\n else\n npx semantic-release\n fi\n AFTER=$(git rev-parse HEAD)\n # semantic-release only commits (`chore(release): … [skip ci]`) when it\n # actually publishes. That commit gets no CI (and so no coverage\n # upload), which makes the next PR's `codecov/project` compare a full\n # report against a stale ancestor — a phantom drop (holocron#644).\n # Emit the new SHA so the steps below upload coverage for it.\n if [ \"$BEFORE\" != \"$AFTER\" ]; then\n echo \"commit=$AFTER\" >> \"$GITHUB_OUTPUT\"\n echo \"previous=$PREVIOUS\" >> \"$GITHUB_OUTPUT\"\n # The new version's channel: the prerelease identifier of its tag\n # (v5.0.0-alpha.108 or cli-v5.0.0-alpha.108 -> alpha), empty for a stable release.\n VERSION=$(git describe --tags --abbrev=0 \"${MATCH[@]}\")\n VERSION=${VERSION#\"$PREFIX\"}\n CHANNEL=\"\"\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n echo \"channel=$CHANNEL\" >> \"$GITHUB_OUTPUT\"\n fi\n env:\n DRY_RUN: ${{ inputs.dry-run }}\n # Read by the repo's release config to release one version group.\n RELEASE_GROUP: ${{ inputs.group }}\n # Prefer HOLOCRON_RELEASE_TOKEN (fine-grained PAT, Contents+Issues+PRs write,\n # owned by an admin with ruleset bypass) so @semantic-release/git can\n # push the version-bump commit through branch protection. Falls back to\n # HOLOCRON_SYNC_TOKEN (legacy) then github.token for unprotected repos.\n GITHUB_TOKEN: ${{ secrets.HOLOCRON_RELEASE_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || github.token }}\n HUSKY: \"0\"\n NPM_CONFIG_PROVENANCE: true\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Coverage for the release commit\n if: ${{ steps.release.outputs.commit != '' }}\n with:\n task: test:unit\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload release-commit coverage to Codecov\n if: ${{ steps.release.outputs.commit != '' }}\n # fail_ci_if_error makes a failed upload fail this step, so it is visible, but\n # continue-on-error keeps it from failing the job: the release has already\n # published, and the Sentry release steps below must still run (holocron#934).\n continue-on-error: true\n with:\n use_oidc: true\n fail_ci_if_error: true\n override_commit: ${{ steps.release.outputs.commit }}\n override_branch: ${{ github.ref_name }}\n\n - name: Get release version\n id: release_version\n if: ${{ inputs.sentry-project != '' && inputs.dry-run != true }}\n env:\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=(--match \"v[0-9]*\")\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n MATCH=(--match \"${RELEASE_GROUP}-v*\")\n PREFIX=\"${RELEASE_GROUP}-v\"\n fi\n TAG=$(git describe --tags --abbrev=0 \"${MATCH[@]}\" 2>/dev/null || echo \"\")\n if [ -n \"$TAG\" ]; then\n echo \"release=${SENTRY_PROJECT}@${TAG#\"$PREFIX\"}\" >> \"$GITHUB_OUTPUT\"\n fi\n\n - name: Create Sentry release\n if: ${{ inputs.sentry-project != '' && steps.release_version.outputs.release != '' && inputs.dry-run != true }}\n uses: getsentry/action-release@2e505a70ff06dac263413242aa3617fec90134e5 # v3\n env:\n SENTRY_AUTH_TOKEN: ${{ secrets.HOLOCRON_SENTRY_RELEASE_TOKEN || secrets.SENTRY_AUTH_TOKEN }}\n SENTRY_ORG: ${{ vars.HOLOCRON_SENTRY_ORG || vars.SENTRY_ORG }}\n SENTRY_PROJECT: ${{ inputs.sentry-project }}\n with:\n environment: production\n version: ${{ steps.release_version.outputs.release }}\n sourcemaps: \"**/dist\"\n\n republish:\n name: Republish\n # Publishes what npm lacks for a tag that already exists (holocron#1387). Never tags, never makes a release or a\n # release commit, never moves a branch: it reads the tag and publishes. It holds no write token for the repository.\n if: ${{ inputs.republish-tag != '' }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - name: Check the tag\n id: tag\n env:\n TAG: ${{ inputs.republish-tag }}\n RELEASE_GROUP: ${{ inputs.group }}\n EXCLUDED_GROUPS: ${{ inputs.exclude-groups }}\n DRY_RUN: ${{ inputs.dry-run }}\n run: |\n # A group's tags are `<group>-v<version>`; the rest of the repo's are `v<version>`.\n PREFIX=\"v\"\n if [ -n \"$RELEASE_GROUP\" ]; then PREFIX=\"${RELEASE_GROUP}-v\"; fi\n case \"$TAG\" in\n \"$PREFIX\"[0-9]*) ;;\n *) echo \"::error::$TAG is not a ${PREFIX}<version> tag\"; exit 1 ;;\n esac\n VERSION=${TAG#\"$PREFIX\"}\n # The channel is the prerelease identifier (5.0.0-alpha.9 -> alpha), `latest` for a stable version.\n CHANNEL=latest\n case \"$VERSION\" in *-*) PRE=${VERSION#*-}; CHANNEL=${PRE%%.*} ;; esac\n ARGS=\"--skip-already-published --tag $CHANNEL\"\n if [ -n \"$RELEASE_GROUP\" ]; then\n ARGS=\"$ARGS --group $RELEASE_GROUP\"\n else\n for g in $EXCLUDED_GROUPS; do ARGS=\"$ARGS --exclude-group $g\"; done\n fi\n # A manual run defaults to a dry run, so a republish is previewed before it publishes.\n if [ \"$DRY_RUN\" = \"true\" ]; then ARGS=\"$ARGS --dry-run\"; fi\n echo \"args=$ARGS\" >> \"$GITHUB_OUTPUT\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the tag\n with:\n ref: refs/tags/${{ inputs.republish-tag }}\n fetch-depth: 0\n persist-credentials: false\n\n # Only a tag on a release branch is republished: a tag pushed to some other branch is not a release.\n - name: Require a release branch\n env:\n TAG: ${{ inputs.republish-tag }}\n run: |\n git fetch --no-tags origin '+refs/heads/main:refs/remotes/origin/main' '+refs/heads/alpha:refs/remotes/origin/alpha' || true\n for branch in main alpha; do\n if git rev-parse --verify --quiet \"refs/remotes/origin/$branch\" >/dev/null && git merge-base --is-ancestor HEAD \"refs/remotes/origin/$branch\"; then\n echo \"$TAG is on $branch\"\n exit 0\n fi\n done\n echo \"::error::$TAG is not on main or alpha, so it is not republished\"\n exit 1\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Upgrade npm for OIDC support\n run: npm install -g npm@11 sigstore\n\n - run: pnpm build\n name: Build\n if: ${{ inputs.run-build == true }}\n\n # Writes the packages left unpublished to the job summary and fails when one is.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Publish what npm lacks\n env:\n NPM_CONFIG_PROVENANCE: true\n with:\n command: publish package\n args: ${{ steps.tag.outputs.args }}\n\n deploy:\n name: Deploy\n needs: release\n # Only after a release that actually published (`commit` is empty on a dry\n # run or when nothing was released). A failed deploy fails only this job:\n # the release is already on npm, and this job re-runs on its own.\n if: ${{ inputs.deploy-on-release == true && inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: write\n runs-on: ubuntu-latest\n timeout-minutes: 30\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n # No credential is left in .git/config: the deploy script below runs with VERCEL_TOKEN and must not find a\n # write token. Only the record step at the end is given one (holocron#2330).\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Deploy packages that deploy on release\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n with:\n command: deploy on-release\n args: >-\n --channel=${{ needs.release.outputs.channel }}\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --record-file=${{ runner.temp }}/deployed.json\n\n # Records each package that deployed as a `deployed/<package>` tag, so a later release can make up a deploy this\n # one missed (holocron#2330). It runs even after a failed deploy (for the packages that did deploy), deploys\n # nothing, and is the only step that gets the job's token, in its own environment and never in .git/config.\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Record the deploys\n if: ${{ !cancelled() }}\n env:\n GITHUB_TOKEN: ${{ github.token }}\n with:\n command: deploy on-release\n args: >-\n --record\n --record-file=${{ runner.temp }}/deployed.json\n\n announce:\n name: Announce release\n needs: release\n # Posts the release to #releases with a thread of its packages (holocron#2777, `holocron sync releases`). Only after\n # a release that actually published, never on a dry run. Like the deploy job, a failure fails only this job: the\n # release is already on npm. A repo without the two secrets gets a warning and no post.\n if: ${{ inputs.dry-run != true && needs.release.outputs.commit != '' }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n # The `releases` channel's webhook (the layout's `webhook: true` stores it as this org secret); the Discord\n # provider reads HOLOCRON_DISCORD_WEBHOOK as its default webhook.\n HOLOCRON_DISCORD_WEBHOOK: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_RELEASES }}\n steps:\n - name: Warn that the release is not announced\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN == '' || env.HOLOCRON_DISCORD_WEBHOOK == '' }}\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN or HOLOCRON_NOTIFY_WEBHOOK_RELEASES is not set, so the release was not announced.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the release commit\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n ref: ${{ needs.release.outputs.commit }}\n fetch-depth: 0\n persist-credentials: false\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n\n # The release's tag, the way the release job names it: `<group>-v<version>` for a group, `v<version>` otherwise.\n - name: Find the release tag\n id: tag\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n env:\n RELEASE_GROUP: ${{ inputs.group }}\n run: |\n MATCH=\"v[0-9]*\"\n if [ -n \"$RELEASE_GROUP\" ]; then MATCH=\"${RELEASE_GROUP}-v*\"; fi\n echo \"tag=$(git describe --tags --abbrev=0 --match \"$MATCH\" HEAD 2>/dev/null || true)\" >> \"$GITHUB_OUTPUT\"\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Announce the release\n if: ${{ env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.HOLOCRON_DISCORD_WEBHOOK != '' }}\n with:\n command: sync releases\n args: >-\n --from=${{ needs.release.outputs.previous }}\n --to=${{ needs.release.outputs.commit }}\n --tag=${{ steps.tag.outputs.tag }}\n --yes\n\n sync-readme:\n name: Post-release readme sync\n needs: release\n if: ${{ inputs.post-release == true && inputs.dry-run != true }}\n runs-on: ubuntu-latest\n timeout-minutes: 5\n steps:\n - name: Trigger broadcast readme sync\n run: |\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=readme\"\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n";
|
|
541
|
+
var remind_doctor_default$1 = "name: Remind Doctor\n\n# A weekly nudge to run the drift check by hand (#1585). `holocron doctor notifications` compares the layout with the\n# live server and reads the Worker, the tracker and the secrets with provider tokens, which stay on a maintainer's\n# machine rather than in CI. This posts one line to #alerts, no ping, naming the command that checks and shares the\n# result. A missing webhook secret skips the post and never fails the run.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: The #alerts webhook the reminder posts to. Without it the post is skipped.\n required: false\n\njobs:\n remind-doctor:\n name: Remind to run the drift check\n permissions: {}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n steps:\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: \"Remind #alerts\"\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n message: \"🩺 ${{ github.repository }}: time for the weekly drift check. Run `holocron doctor notifications --built-only --post` to compare the server with the layout and post the result here.\"\n";
|
|
558
542
|
var code_default$2 = "name: Security\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n language:\n description: CodeQL language to analyze\n type: string\n required: false\n default: javascript-typescript\n\njobs:\n analyze:\n name: Analyze (${{ inputs.language }})\n permissions:\n actions: read\n contents: read\n security-events: write\n runs-on: ubuntu-latest\n timeout-minutes: 45\n # Do not cancel in-progress security scans.\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: github/codeql-action/init@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Initialize CodeQL\n with:\n languages: ${{ inputs.language }}\n\n - uses: github/codeql-action/autobuild@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Autobuild\n\n - uses: github/codeql-action/analyze@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5\n name: Analyze\n with:\n category: /language:${{ inputs.language }}\n";
|
|
559
|
-
var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n secret-detection:\n name: Run gitleaks\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # gitleaks has no npm distribution. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n # The maintainer's install.sh is gone (404), and piping curl into sh hid\n # that: the step passed with no binary and the scan never ran (#2452).\n - name: Install gitleaks\n env:\n GITLEAKS_VERSION: 8.30.1\n GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb\n run: |\n archive=\"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${archive}\"\n echo \"${GITLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" gitleaks\n install -m 0755 \"${RUNNER_TEMP}/gitleaks\" /usr/local/bin/gitleaks\n\n # `holocron run scan:secrets` passes when gitleaks is not on PATH, so\n # fail here if it is not.\n - name: Check gitleaks is installed\n run: gitleaks version\n\n - uses: theholocron
|
|
543
|
+
var secrets_default$1 = "name: Secret Detection\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n secret-detection:\n name: Run gitleaks\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # gitleaks has no npm distribution. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n # The maintainer's install.sh is gone (404), and piping curl into sh hid\n # that: the step passed with no binary and the scan never ran (#2452).\n - name: Install gitleaks\n env:\n GITLEAKS_VERSION: 8.30.1\n GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb\n run: |\n archive=\"gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${archive}\"\n echo \"${GITLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" gitleaks\n install -m 0755 \"${RUNNER_TEMP}/gitleaks\" /usr/local/bin/gitleaks\n\n # `holocron run scan:secrets` passes when gitleaks is not on PATH, so\n # fail here if it is not.\n - name: Check gitleaks is installed\n run: gitleaks version\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run gitleaks\n with:\n task: scan:secrets\n\n # Advisory (#1573): betterleaks v2 is still a release candidate, so this job\n # never fails the run (each step has `continue-on-error`, so the job ends\n # green) and gitleaks above stays the required check. A finding or a failed\n # install shows as a warning. It runs only in a repo that has a\n # `betterleaks.toml`. When v2 is stable, bump the pin, drop `continue-on-error`\n # and retire the gitleaks job.\n betterleaks:\n name: Run betterleaks (advisory)\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n # Betterleaks has no GitHub Action. Install one pinned release and check\n # the tarball against the SHA-256 written here, not one fetched beside it.\n - name: Install betterleaks\n id: install\n if: ${{ hashFiles('betterleaks.toml') != '' }}\n continue-on-error: true\n env:\n BETTERLEAKS_VERSION: 2.0.0-rc.9\n BETTERLEAKS_SHA256: 772a1a2e2d13a5bd80ef4bc900ad90942ac4383ac79fb6cdfcc7df542434f2f8\n run: |\n archive=\"betterleaks_${BETTERLEAKS_VERSION}_linux_x64.tar.gz\"\n curl -sSfL -o \"${RUNNER_TEMP}/${archive}\" \\\n \"https://github.com/betterleaks/betterleaks/releases/download/v${BETTERLEAKS_VERSION}/${archive}\"\n echo \"${BETTERLEAKS_SHA256} ${RUNNER_TEMP}/${archive}\" | sha256sum --check --strict\n tar -xzf \"${RUNNER_TEMP}/${archive}\" -C \"${RUNNER_TEMP}\" betterleaks\n install -m 0755 \"${RUNNER_TEMP}/betterleaks\" /usr/local/bin/betterleaks\n\n # Medium confidence and up: the low-confidence generic rules flag test\n # fixtures. Betterleaks reads `.betterleaksignore` (exact secret values\n # to skip) from the checkout itself.\n - name: Run betterleaks\n if: ${{ steps.install.outcome == 'success' }}\n continue-on-error: true\n run: |\n set -o pipefail\n if ! betterleaks git --no-banner --config betterleaks.toml --confidence=medium --redact .; then\n echo \"::warning title=betterleaks::Advisory scan found something or failed. Gitleaks is the required check; see the log.\"\n exit 1\n fi\n";
|
|
560
544
|
var sync_dispatch_default = "name: Sync Dispatch\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n steps:\n description: >\n Sync steps to pass to each repo's sync.yml. Default is \"readme\"\n (only README marker blocks are updated).\n type: string\n required: false\n default: readme\n\npermissions:\n contents: read\n\njobs:\n broadcast:\n name: Broadcast sync to all repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - name: Dispatch sync to all repos with sync.yml\n run: |\n gh api \"/orgs/$GITHUB_REPOSITORY_OWNER/repos\" --paginate --jq '.[].name' \\\n | while IFS= read -r repo; do\n gh api \"/repos/$GITHUB_REPOSITORY_OWNER/$repo/contents/.github/workflows/sync.yml\" --silent 2>/dev/null || continue\n echo \"Dispatching sync to $GITHUB_REPOSITORY_OWNER/$repo\"\n gh workflow run sync.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/$repo\" \\\n --field \"steps=$STEPS\" \\\n || echo \"Warning: could not dispatch to $GITHUB_REPOSITORY_OWNER/$repo — skipping\"\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n STEPS: ${{ inputs.steps }}\n";
|
|
561
|
-
var sync_incidents_default$1 = "name: Sync incidents\n\n# Mirrors the status page's incidents into the forum the layout gives `feeds.incidents` (#2366, spec\n# `tech-incidents-to-discord`). It runs `holocron sync incidents --yes`, which reads state, not events: every incident\n# still open and those resolved in the last two days, and brings each one's post in step with it (a missing post is made,\n# a new update is appended once, the tag and the closed state follow the status). Nothing is deleted. It only reads\n# Checkly and only writes to Discord, so it changes no file and opens no pull request.\n#\n# Its caller runs it every ten minutes and on demand, with `dry-run` to see what a run would do. Incidents are rare and\n# written by hand, so a notice up to ten minutes late (plus GitHub's own delay, which also drops scheduled runs; the\n# heartbeat is more lenient than the cron) is acceptable. The first run posts only what is open or recent, so a page with\n# history is not dumped into the forum.\n#\n# It needs two secrets in the `ci` layer: `HOLOCRON_CHECKLY_TOKEN` (it only reads; the key held today can also write the\n# status page, because no narrower key is available, and a Read Only key would be enough here) and\n# `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot, which must be able to post in the forum and manage its threads). Without\n# either the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_CHECKLY_TOKEN:\n description: The Checkly API key that reads the status page's incidents. Without it the job warns and does nothing.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_INCIDENTS:\n description: The ping URL of the `sync-incidents` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-incidents:\n name: Sync status page incidents\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same incident.\n concurrency:\n group: sync-incidents\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n env:\n HOLOCRON_CHECKLY_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN }}\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that a token is missing\n if: env.HOLOCRON_CHECKLY_TOKEN == '' || env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_CHECKLY_TOKEN and HOLOCRON_DISCORD_BOT_TOKEN are both needed, and one is not set, so no incidents were synced. Add them as Actions secrets.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron
|
|
562
|
-
var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one tracker up to date from another (SPEC-0071 section 4, #1859, spec\n# `tech-issue-sync-schedule-and-assignees`, #2251): runs `holocron sync issues --from <from> --to <to>`, which creates what the\n# target is missing, updates what an earlier sync made and adds the comments it lacks. With `both` it then runs the swapped\n# direction, after the first and in the same job, so two runs never touch the same issue at once (each direction never\n# echoes what the other made).\n#\n# `from` and `to` are the command's endpoints: `github`, or `provider:key=value,...` (`linear:team=ENG`). Only a repo whose\n# `tasks:` lists `sync-issues` (with these inputs under `with:`) gets the caller, so a repo with one tracker is untouched.\n#\n# Tokens reach the job in its environment, never on a command line: `HOLOCRON_LINEAR_TOKEN` from the secret of that name and\n# GitHub's from `HOLOCRON_ISSUES_TOKEN` (the job's own token when that is not set). Scheduled hourly by the caller; a failed\n# run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n from:\n description: Where the issues are read from (`github`, or `provider:key=value,...`).\n type: string\n required: true\n to:\n description: Where they are written, in the same form.\n type: string\n required: true\n since:\n description: Only issues changed since this date or span back from now (2026-03-01, 7d, 12h).\n type: string\n required: false\n default: 2d\n both:\n description: Also run the swapped direction after the first.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_LINEAR_TOKEN:\n description: The Linear API key, when an endpoint is Linear.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: A GitHub token that can read and write issues; the job's own token is used when it is not set.\n required: false\n\njobs:\n sync-issues:\n name: Sync issues between trackers\n permissions:\n contents: read\n issues: write\n runs-on: ubuntu-latest\n timeout-minutes: 20\n # Two runs could each create the same issue on the target, so a second waits for the first.\n concurrency:\n group: sync-issues\n cancel-in-progress: false\n env:\n HOLOCRON_LINEAR_TOKEN: ${{ secrets.HOLOCRON_LINEAR_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN || github.token }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
563
|
-
var sync_prs_default$1 = "name: Sync PRs\n\n# Keeps the pull request forum's posts in step with GitHub (#2853, spec `tech-discord-notifications-v2`, step 3). It runs\n# `holocron sync prs --yes`, which reads state, not events: every open pull request and the forum's posts, and puts each\n# post's tag, title and first message right and archives the post of a pull request that is closed or merged. Sentinel's\n# feed writes a post on each webhook delivery; this catches what a missed delivery, an outage or a hand-changed tag\n# left wrong. Discord does not set a pull request's state: a tag a person changed is set back. A post whose pull request\n# is gone is reported and left alone, and the post of a closed pull request is deleted only when `feeds.prs.retainDays`\n# says so and no person has written in it. It only reads GitHub and only writes to Discord, so it changes no file and\n# opens no pull request.\n#\n# Its caller runs it every fifteen minutes and on demand, with `dry-run` to see what a run would do. Sentinel's cron\n# starts it too (a `SCHEDULED_TASKS` row, #2868), and its `sync-prs` heartbeat tells Checkly each run finished.\n#\n# It needs the `HOLOCRON_DISCORD_BOT_TOKEN` secret (the Holonet bot, which must be able to edit and delete threads in the\n# forum). The pull requests are read with `HOLOCRON_PULLS_TOKEN` when there is one, else with the run's own token. Without\n# the bot token the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_PULLS_TOKEN:\n description: Reads the pull requests, their reviews and checks. Without it the run's own token is used.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_PRS:\n description: The ping URL of the `sync-prs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-prs:\n name: Sync pull request posts\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each edit the same post.\n concurrency:\n group: sync-prs\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n HOLOCRON_PULLS_TOKEN: ${{ secrets.HOLOCRON_PULLS_TOKEN || github.token }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that the Discord token is missing\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no pull request posts were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron
|
|
564
|
-
var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/.github/.github/actions/holocron@main\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/.github/.github/actions/auto-commit@main\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/.github/.github/actions/notify@main\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
|
|
565
|
-
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061). It used to write one key,\n# `SENTINEL_AXIOM_INGEST_TOKEN`, to an organization Actions secret as well, for the dispatched check workflow; Sentinel no longer\n# dispatches it (#2263), so nothing in Actions needs a copy and no GitHub token is passed. apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
566
|
-
var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_SPECS:\n description: The ping URL of the `sync-specs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron
|
|
567
|
-
var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
545
|
+
var sync_incidents_default$1 = "name: Sync incidents\n\n# Mirrors the status page's incidents into the forum the layout gives `feeds.incidents` (#2366, spec\n# `tech-incidents-to-discord`). It runs `holocron sync incidents --yes`, which reads state, not events: every incident\n# still open and those resolved in the last two days, and brings each one's post in step with it (a missing post is made,\n# a new update is appended once, the tag and the closed state follow the status). Nothing is deleted. It only reads\n# Checkly and only writes to Discord, so it changes no file and opens no pull request.\n#\n# Its caller runs it every ten minutes and on demand, with `dry-run` to see what a run would do. Incidents are rare and\n# written by hand, so a notice up to ten minutes late (plus GitHub's own delay, which also drops scheduled runs; the\n# heartbeat is more lenient than the cron) is acceptable. The first run posts only what is open or recent, so a page with\n# history is not dumped into the forum.\n#\n# It needs two secrets in the `ci` layer: `HOLOCRON_CHECKLY_TOKEN` (it only reads; the key held today can also write the\n# status page, because no narrower key is available, and a Read Only key would be enough here) and\n# `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot, which must be able to post in the forum and manage its threads). Without\n# either the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_CHECKLY_TOKEN:\n description: The Checkly API key that reads the status page's incidents. Without it the job warns and does nothing.\n required: false\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_INCIDENTS:\n description: The ping URL of the `sync-incidents` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-incidents:\n name: Sync status page incidents\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same incident.\n concurrency:\n group: sync-incidents\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n env:\n HOLOCRON_CHECKLY_TOKEN: ${{ secrets.HOLOCRON_CHECKLY_TOKEN }}\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that a token is missing\n if: env.HOLOCRON_CHECKLY_TOKEN == '' || env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_CHECKLY_TOKEN and HOLOCRON_DISCORD_BOT_TOKEN are both needed, and one is not set, so no incidents were synced. Add them as Actions secrets.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the incidents\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync incidents --dry-run\n else\n node cli/cli/dist/cli.mjs sync incidents --yes\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-incidents` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job. A dry run does not ping.\n - name: Ping the heartbeat\n if: env.HOLOCRON_CHECKLY_TOKEN != '' && env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_INCIDENTS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_INCIDENTS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
546
|
+
var sync_issues_default$1 = "name: Sync Issues\n\n# Keeps the issues of one tracker up to date from another (SPEC-0071 section 4, #1859, spec\n# `tech-issue-sync-schedule-and-assignees`, #2251): runs `holocron sync issues --from <from> --to <to>`, which creates what the\n# target is missing, updates what an earlier sync made and adds the comments it lacks. With `both` it then runs the swapped\n# direction, after the first and in the same job, so two runs never touch the same issue at once (each direction never\n# echoes what the other made).\n#\n# `from` and `to` are the command's endpoints: `github`, or `provider:key=value,...` (`linear:team=ENG`). Only a repo whose\n# `tasks:` lists `sync-issues` (with these inputs under `with:`) gets the caller, so a repo with one tracker is untouched.\n#\n# Tokens reach the job in its environment, never on a command line: `HOLOCRON_LINEAR_TOKEN` from the secret of that name and\n# GitHub's from `HOLOCRON_ISSUES_TOKEN` (the job's own token when that is not set). Scheduled hourly by the caller; a failed\n# run reaches #alerts through `platform.notifications.yml`.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n from:\n description: Where the issues are read from (`github`, or `provider:key=value,...`).\n type: string\n required: true\n to:\n description: Where they are written, in the same form.\n type: string\n required: true\n since:\n description: Only issues changed since this date or span back from now (2026-03-01, 7d, 12h).\n type: string\n required: false\n default: 2d\n both:\n description: Also run the swapped direction after the first.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_LINEAR_TOKEN:\n description: The Linear API key, when an endpoint is Linear.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: A GitHub token that can read and write issues; the job's own token is used when it is not set.\n required: false\n\njobs:\n sync-issues:\n name: Sync issues between trackers\n permissions:\n contents: read\n issues: write\n runs-on: ubuntu-latest\n timeout-minutes: 20\n # Two runs could each create the same issue on the target, so a second waits for the first.\n concurrency:\n group: sync-issues\n cancel-in-progress: false\n env:\n HOLOCRON_LINEAR_TOKEN: ${{ secrets.HOLOCRON_LINEAR_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN || github.token }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Sync issues\n with:\n command: sync issues --yes --from ${{ inputs.from }} --to ${{ inputs.to }} --since ${{ inputs.since }}\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Sync issues, the other way\n if: ${{ inputs.both }}\n with:\n command: sync issues --yes --from ${{ inputs.to }} --to ${{ inputs.from }} --since ${{ inputs.since }}\n";
|
|
547
|
+
var sync_prs_default$1 = "name: Sync PRs\n\n# Keeps the pull request forum's posts in step with GitHub (#2853, spec `tech-discord-notifications-v2`, step 3). It runs\n# `holocron sync prs --yes`, which reads state, not events: every open pull request and the forum's posts, and puts each\n# post's tag, title and first message right and archives the post of a pull request that is closed or merged. Sentinel's\n# feed writes a post on each webhook delivery; this catches what a missed delivery, an outage or a hand-changed tag\n# left wrong. Discord does not set a pull request's state: a tag a person changed is set back. A post whose pull request\n# is gone is reported and left alone, and the post of a closed pull request is deleted only when `feeds.prs.retainDays`\n# says so and no person has written in it. It only reads GitHub and only writes to Discord, so it changes no file and\n# opens no pull request.\n#\n# Its caller runs it every fifteen minutes and on demand, with `dry-run` to see what a run would do. Sentinel's cron\n# starts it too (a `SCHEDULED_TASKS` row, #2868), and its `sync-prs` heartbeat tells Checkly each run finished.\n#\n# It needs the `HOLOCRON_DISCORD_BOT_TOKEN` secret (the Holonet bot, which must be able to edit and delete threads in the\n# forum). The pull requests are read with `HOLOCRON_PULLS_TOKEN` when there is one, else with the run's own token. Without\n# the bot token the job warns and does nothing.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be changed; write nothing to Discord.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_PULLS_TOKEN:\n description: Reads the pull requests, their reviews and checks. Without it the run's own token is used.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_PRS:\n description: The ping URL of the `sync-prs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-prs:\n name: Sync pull request posts\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each edit the same post.\n concurrency:\n group: sync-prs\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 10\n permissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n HOLOCRON_PULLS_TOKEN: ${{ secrets.HOLOCRON_PULLS_TOKEN || github.token }}\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that the Discord token is missing\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no pull request posts were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the pull request posts\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync prs --dry-run\n else\n node cli/cli/dist/cli.mjs sync prs --yes\n fi\n\n # Tells Checkly this run finished (#2868, the `sync-prs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. A no-op until the secret exists; the URL is a credential: it goes in through\n # `env` only, is masked, and a failed ping never fails the job. A dry run does not ping.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_PRS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_PRS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
548
|
+
var sync_repo_default$1 = "name: Sync\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n steps:\n description: >\n Sync steps to run (default: all). Valid values:\n labels, properties, teams, topics, keywords, description, homepage, readme, workflows, wiki.\n Pass a space-separated list to run a subset, e.g. \"readme\" or \"readme wiki\".\n type: string\n required: false\n secrets:\n HOLOCRON_ADMIN_TOKEN:\n description: Fine-grained PAT with admin scopes (labels, properties, teams).\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_DEPLOY_TOKEN:\n description: Fine-grained PAT for GitHub Pages configuration.\n required: false\n HOLOCRON_ISSUES_TOKEN:\n description: Fine-grained PAT for issue management.\n required: false\n HOLOCRON_ORG_TOKEN:\n description: Org-scoped fine-grained PAT for team sync and org properties.\n required: false\n HOLOCRON_READ_TOKEN:\n description: Fine-grained PAT for read-only GitHub API calls.\n required: false\n HOLOCRON_SYNC_TOKEN:\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_SYNC:\n description: >\n Webhook for the sync channel: a sync PR opened and its\n auto-merge result. Unset = no post.\n required: false\n HOLOCRON_NOTIFY_WEBHOOK_ALERTS:\n description: >\n Webhook for the alerts channel: a failed sync run, or a sync\n PR that needs a manual merge. Unset = no post. The optional\n HOLOCRON_NOTIFY_ALERT_ROLE secret (a role id) makes these posts\n mention that role.\n required: false\n HOLOCRON_NOTIFY_ALERT_ROLE:\n description: >\n Id of the role to mention on alerts. Written by `holocron\n setup notifications`; not sensitive, kept as a secret so the same\n token that writes the webhook secrets can write it. Optional.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for gh CLI calls. Used when\n HOLOCRON_SYNC_TOKEN is not set.\n required: false\n\njobs:\n sync:\n name: Run holocron sync\n runs-on: ubuntu-latest\n timeout-minutes: 10\n # Serialise the find-or-create-PR and supersede steps repo-wide: the caller's\n # concurrency key is per ref, so runs from different refs could otherwise\n # interleave and leave several sync PRs open.\n concurrency:\n group: repo-sync-pr-${{ github.repository }}\n cancel-in-progress: false\n permissions:\n contents: write\n pull-requests: write\n # Job-level so the `holocron` composite action's steps inherit them.\n env:\n HOLOCRON_ADMIN_TOKEN: ${{ secrets.HOLOCRON_ADMIN_TOKEN }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n HOLOCRON_DEPLOY_TOKEN: ${{ secrets.HOLOCRON_DEPLOY_TOKEN }}\n HOLOCRON_ISSUES_TOKEN: ${{ secrets.HOLOCRON_ISSUES_TOKEN }}\n HOLOCRON_ORG_TOKEN: ${{ secrets.HOLOCRON_ORG_TOKEN }}\n HOLOCRON_READ_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - name: Run holocron sync\n id: sync\n # The `holocron` action resolves @theholocron/cli from node_modules (or\n # builds the workspace when it's an unbuilt checkout — the holocron repo\n # itself). `inputs.steps` is a space-separated list or empty; the\n # `--steps <list>` arg is omitted when empty.\n uses: theholocron/holocron/ci/actions/holocron@ci-v1\n with:\n command: sync\n args: ${{ inputs.steps != '' && format('--steps {0}', inputs.steps) || '' }}\n\n - name: Format generated files\n run: |\n pnpm exec prettier --write README.md docs/src/content/docs/index.mdx 2>/dev/null || true\n # `holocron sync` writes package.json fields (keywords, description,\n # homepage) with a plain assignment, which appends new keys at the\n # end — re-apply the canonical order the lint config enforces.\n pnpm exec eslint --fix --no-warn-ignored package.json 2>/dev/null || true\n\n - uses: theholocron/holocron/ci/actions/auto-commit@ci-v1\n id: auto-commit\n name: Commit sync changes\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # One branch per source commit (full SHA, so distinct commits never collide): a PR left unreviewed never blocks the\n # next sync, and a re-run for the same commit updates its own branch.\n branch: ${{ format('chore/auto-sync-{0}', github.sha) }}\n commit-message: \"chore: sync from holocron.config\"\n commit-options: \"--no-verify\"\n\n - name: Open PR and enable auto-merge\n id: pr\n if: steps.auto-commit.outputs.changes-detected == 'true'\n run: |\n # Find or create this run's PR first: older PRs are only closed once\n # a replacement exists, so a failure here never leaves the changes\n # without an open PR.\n url=$(gh pr view \"$BRANCH\" --json url --jq .url 2>/dev/null || gh pr create \\\n --title \"chore: sync README and repo metadata\" \\\n --body \"Automated sync from holocron.config. Auto-merges once required checks pass.\" \\\n --base main \\\n --head \"$BRANCH\")\n created=$(gh pr view \"$url\" --json createdAt --jq .createdAt)\n\n # Supersede older sync PRs: same-repo only, exact generated or legacy\n # branch name, and created before this one (a slow older run can\n # never close a newer PR). --limit covers more than the default page.\n gh pr list --state open --limit 200 --json number,headRefName,isCrossRepository,createdAt \\\n --jq \".[] | select(.isCrossRepository | not) | select(.headRefName == \\\"chore/auto-sync\\\" or (.headRefName | test(\\\"^chore/auto-sync-[0-9a-f]{40}$\\\"))) | select(.headRefName != \\\"$BRANCH\\\") | select(.createdAt < \\\"$created\\\") | .number\" |\n while read -r n; do\n gh pr close \"$n\" --delete-branch --comment \"Superseded by $url.\" || true\n done\n\n # Delete pushed sync branches that never got a PR (e.g. a run\n # cancelled between push and PR creation). The repo-wide concurrency\n # group means no other run is mid-flight here.\n open=$(gh pr list --state open --limit 200 --json headRefName --jq '.[].headRefName')\n git ls-remote --heads origin 'refs/heads/chore/auto-sync-*' | sed 's|.*refs/heads/||' |\n while read -r b; do\n [ \"$b\" = \"$BRANCH\" ] && continue\n echo \"$b\" | grep -Eq '^chore/auto-sync-[0-9a-f]{40}$' || continue\n echo \"$open\" | grep -qxF \"$b\" || git push origin --delete \"$b\" || true\n done\n\n # A PR opened with the default GITHUB_TOKEN does not trigger\n # pull_request workflows, so required checks would never start and\n # auto-merge would wait forever.\n if [ \"$HAS_PAT\" != \"true\" ]; then\n echo \"::warning::Sync PR $url opened with GITHUB_TOKEN: checks will not run and auto-merge is skipped. Set HOLOCRON_SYNC_TOKEN.\"\n echo \"Sync PR $url — needs manual merge (no PAT).\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (no PAT, so checks will not run)\"\n attention=true\n elif gh pr merge \"$url\" --auto --squash; then\n echo \"Sync PR $url — auto-merge enabled.\" | tee -a \"$GITHUB_STEP_SUMMARY\"\n result=\"auto-merge enabled\"\n else\n echo \"::warning::Sync PR $url opened but auto-merge could not be enabled; merge it manually.\"\n echo \"Sync PR $url — needs manual merge.\" >> \"$GITHUB_STEP_SUMMARY\"\n result=\"needs a manual merge (auto-merge could not be enabled)\"\n attention=true\n fi\n {\n echo \"url=$url\"\n echo \"result=$result\"\n echo \"attention=${attention:-false}\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n BRANCH: ${{ format('chore/auto-sync-{0}', github.sha) }}\n HAS_PAT: ${{ secrets.HOLOCRON_SYNC_TOKEN != '' || secrets.GH_TOKEN != '' }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # The closing line of `holocron sync` (\"80 ok, 0 fail, 0 skipped\"), for the run's summary and the posts below. A log\n # with no such line gives an empty count, and the posts leave it out.\n - name: Summarise the sync\n id: summary\n if: ${{ !cancelled() && steps.sync.outputs.log-file != '' }}\n env:\n LOG_FILE: ${{ steps.sync.outputs.log-file }}\n run: |\n esc=$(printf '\\033')\n counts=$(sed \"s/${esc}\\[[0-9;]*m//g\" \"$LOG_FILE\" | grep -E '^ *[0-9]+ ok, [0-9]+ fail' | tail -1 | sed 's/^ *//' || true)\n echo \"counts=$counts\" >> \"$GITHUB_OUTPUT\"\n if [ -n \"$counts\" ]; then echo \"Sync: $counts\" >> \"$GITHUB_STEP_SUMMARY\"; fi\n\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: Notify of the sync PR\n if: steps.pr.outputs.url != '' && steps.pr.outputs.attention != 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"🔄 ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ steps.summary.outputs.counts != '' && format(' ({0})', steps.summary.outputs.counts) || '' }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n # A run that changed nothing opens no PR, so without this post a successful sync is silent.\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: Notify that the sync had nothing to change\n if: steps.auto-commit.outputs.changes-detected != 'true' && steps.summary.outputs.counts != ''\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_SYNC }}\n message: \"✅ ${{ github.repository }}: sync ran and found nothing to change (${{ steps.summary.outputs.counts }})${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: Notify that a sync PR needs attention\n if: steps.pr.outputs.attention == 'true'\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"⚠️ ${{ github.repository }}: sync PR <${{ steps.pr.outputs.url }}> — ${{ steps.pr.outputs.result }}${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n\n - name: Broadcast wiki sync if navbar changed\n if: >-\n steps.auto-commit.outputs.changes-detected == 'true' &&\n github.event_name == 'push' &&\n (inputs.steps == '' || contains(inputs.steps, 'wiki'))\n run: |\n if git diff HEAD~1 --name-only | grep -q 'fern/docs.yml'; then\n gh workflow run sync-dispatch.yml \\\n --repo \"$GITHUB_REPOSITORY_OWNER/.github\" \\\n --field \"steps=wiki\" \\\n || echo \"skipping broadcast — insufficient permissions\"\n fi\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n\n # A separate job, not a final step: a job-level timeout cancels the sync job\n # before any later step in it can run, so an in-job `if: failure()` step would\n # stay silent on exactly the hang we most want to hear about. `!cancelled()` is\n # false when the whole run was cancelled (a newer run superseded this one), so\n # that expected case stays quiet, while a failed or timed-out sync job alerts.\n notify-failure:\n name: Notify of a failed sync\n needs: sync\n if: ${{ !cancelled() && (needs.sync.result == 'failure' || needs.sync.result == 'cancelled') }}\n runs-on: ubuntu-latest\n timeout-minutes: 2\n permissions: {}\n steps:\n - uses: theholocron/holocron/ci/actions/notify@ci-v1\n name: Notify of a failed sync\n with:\n webhook: ${{ secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS }}\n mention: ${{ secrets.HOLOCRON_NOTIFY_ALERT_ROLE }}\n message: \"❌ ${{ github.repository }}: sync ${{ needs.sync.result == 'cancelled' && 'timed out or was cancelled' || 'failed' }} — <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>${{ github.run_attempt > 1 && format(' (attempt {0})', github.run_attempt) || '' }}\"\n";
|
|
549
|
+
var sync_secrets_default$1 = "name: Sync Secrets\n\n# Sentinel's sync secrets (holocron#781, extended per holocron#800): fans the 1Password Environment of the `prod` layer, `theholocron/holocron - prod`\n# (holocron#1671, #2069; it was `Sentinel`, and Doppler's `sentinel`/prd config before that) out to Vercel (only the keys `repo.secrets.deploy` in\n# apps/sentinel/holocron.config.ts names: the `SENTINEL_` prefix and three `HOLOCRON_` names, #2061). It used to write one key,\n# `SENTINEL_AXIOM_INGEST_TOKEN`, to an organization Actions secret as well, for the dispatched check workflow; Sentinel no longer\n# dispatches it (#2263), so nothing in Actions needs a copy and no GitHub token is passed. apps/sentinel/README.md's \"After registration\"\n# section has the equivalent local invocation and says why each flag is there. The caller is manual only: run it once\n# after registration and again when a secret rotates.\n#\n# `--target production` only, deliberately. A prior version also synced `--target preview` (holocron#1010 follow-up,\n# #1024), reasoning that deploy-preview's function needed the 5 env vars; it does not (`handleWebhookRequest` returns\n# 405 on anything but POST before it reads `env`, and the preview monitoring check only sends a GET). That version ran\n# on 2026-10-14 and synced all 5 keys, `GITHUB_APP_PRIVATE_KEY` included, into Vercel's `preview` target, reachable by\n# any PR's own deployed code, since `deploy-preview` builds every PR from that PR's not-yet-reviewed code. `sync\n# secrets`'s `deployment` destination had no per-key allowlist then (it has one now, #2061: only the keys `repo.secrets.deploy`\n# names reach it, and a run with no entry stops with a ConfigError), so keeping production credentials out of a\n# PR-controlled deploy target entirely was the fix, and `--target production` only stays (the\n# class of exposure #1057/#1058 closed for the Deployment Protection bypass secret). The already-synced preview copies\n# were cleared from Vercel by hand.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n secrets:\n HOLOCRON_VERCEL_TOKEN:\n description: The Vercel token the sync writes with. `VERCEL_TOKEN` is the fallback.\n required: false\n VERCEL_TOKEN:\n required: false\n HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN:\n description: A 1Password service account with read access to the `prod` layer Environment.\n required: true\n\njobs:\n sync-secrets:\n name: Sync 1Password to Vercel\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.HOLOCRON_OP_SERVICE_ACCOUNT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: 1password/install-cli-action@1a3160d5e9de1ae0803eaa08a88746f5ae3daa50 # v4.1.0\n name: Install the 1Password CLI\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Sync secrets\n with:\n command: sync\n args: >-\n secrets --env ${{ inputs.environment }} --cwd apps/sentinel --project-id sentinel\n --target production\n";
|
|
550
|
+
var sync_specs_default$1 = "#\n# Keeps a forum post in #ideas for every ADR and spec, in step with the files (#1535, spec\n# `tech-specs-discussion-threads`). It runs `holocron sync specs`, which makes the posts (titled with the document's own title, tagged\n# with the status), writes each post's address into its file as `discussion.url`, and, when a gatekeeper changed a post's\n# tag, changes the file's `status:` line. It also links the id that opens a post to its file once the file is on `alpha` (#1663), which edits the post only. Those are edits to the working tree only: this workflow commits them to the\n# branch `chore/specs-sync` and opens one pull request. The pull request merges itself (auto-merge, once its checks pass)\n# when it only links posts and numbers documents; one that changes a `status:` waits for a review (#1824).\n#\n# Its caller runs it every hour (so a retag becomes a pull request within the hour), when a spec or ADR lands on `alpha`\n# (so its post exists straight away) and on demand, with `dry-run` to see what a run would do. A first run is the\n# backfill: run it as a dry run, then for real.\n#\n# It needs the org secret `HOLOCRON_DISCORD_BOT_TOKEN` (the Holonet bot) and a forum channel in the layout. Without the\n# token the job warns and does nothing. The pull request is opened with `HOLOCRON_SYNC_TOKEN` when there is one, so its\n# checks run; with the default token they do not, and the pull request needs a push to start them.\n#\n# This replaces the webhook post of #1534: a forum rejects a plain webhook post, and a post per document says more than a\n# line per pull request. A spec in a pull request that has not merged gets its post from the `preview-specs` task (#1600).\n\nname: Sync Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n dry-run:\n description: Only say what would be made or changed; make and write nothing.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_DISCORD_BOT_TOKEN:\n description: The Holonet bot token. Without it the job warns and does nothing.\n required: false\n HOLOCRON_SYNC_TOKEN:\n description: Opens the sync pull request, so that its checks run.\n required: false\n GH_TOKEN:\n description: Fallback for HOLOCRON_SYNC_TOKEN.\n required: false\n HOLOCRON_HEARTBEAT_SYNC_SPECS:\n description: The ping URL of the `sync-specs` heartbeat. Without it the run sends none.\n required: false\n\njobs:\n sync-specs:\n name: Sync spec discussions\n if: github.repository == format('{0}/holocron', github.repository_owner)\n # One run at a time, however it was started: two runs at once could each make a post for the same document. The\n # group is shared with `preview-specs`.\n concurrency:\n group: spec-discussions\n cancel-in-progress: false\n runs-on: ubuntu-latest\n timeout-minutes: 20\n permissions:\n contents: write\n pull-requests: write\n env:\n HOLOCRON_DISCORD_BOT_TOKEN: ${{ secrets.HOLOCRON_DISCORD_BOT_TOKEN }}\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n BRANCH: chore/specs-sync\n DRY_RUN: ${{ inputs.dry-run && 'true' || 'false' }}\n steps:\n - name: Warn that there is no Discord token\n if: env.HOLOCRON_DISCORD_BOT_TOKEN == ''\n run: |\n echo \"::warning::HOLOCRON_DISCORD_BOT_TOKEN is not set, so no spec discussions were synced. Add it as an Actions secret.\"\n\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout the default branch\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n with:\n token: ${{ secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN || github.token }}\n # The whole history: a spec is numbered by when its file was first committed, and its post links the pull\n # request that added it, which the first commit's subject names.\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n\n - name: Build the CLI\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: pnpm turbo run build --filter=@theholocron/cli...\n\n - name: Sync the discussions\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != ''\n run: |\n if [ \"$DRY_RUN\" = \"true\" ]; then\n node cli/cli/dist/cli.mjs sync specs --dry-run\n else\n node cli/cli/dist/cli.mjs sync specs\n fi\n\n # The command changes the files and never commits. What it changed goes to one branch, force-updated each run, so\n # there is at most one open pull request for it.\n - uses: theholocron/holocron/ci/actions/git-identity@ci-v1\n name: Configure git identity\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n\n - name: Commit the edits to the sync branch\n id: commit\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n run: |\n if git diff --quiet; then\n echo \"changed=false\" >> \"$GITHUB_OUTPUT\"\n echo \"Nothing to commit: every post and file is in step.\"\n exit 0\n fi\n git switch -c \"$BRANCH\"\n git add -A .notes docs/wiki\n git commit --no-verify -s -m \"chore(specs): 🔄 sync spec discussions\"\n git push --force origin \"HEAD:refs/heads/$BRANCH\"\n echo \"changed=true\" >> \"$GITHUB_OUTPUT\"\n\n - name: Open the pull request\n if: steps.commit.outputs.changed == 'true'\n run: |\n # An open pull request already carries the new commit: the branch was updated in place.\n if [ \"$(gh pr list --head \"$BRANCH\" --state open --json number --jq length)\" != \"0\" ]; then\n echo \"The sync pull request is open; its branch now has the latest edits.\"\n exit 0\n fi\n cat > \"$RUNNER_TEMP/body.md\" <<'EOF'\n Edits `holocron sync specs` made to the working tree: the address of each spec or ADR discussion post as `discussion.url`, and the `status:` of a document whose post a gatekeeper retagged.\n\n A pull request that only links posts merges itself once its checks pass. One that changes a `status:` waits for a review: the change was asked for by changing the tag on the post in Discord. Merge it to accept the change, or close it and change the tag back. The post is not marked as in step until this merges.\n\n Opened by the Spec discussions workflow (#1535).\n EOF\n gh pr create --base alpha --head \"$BRANCH\" \\\n --title \"chore(specs): 🔄 sync spec discussions\" \\\n --body-file \"$RUNNER_TEMP/body.md\"\n\n # The branch is rebuilt from `alpha` every run, so its one commit is exactly what the pull request changes. A\n # `status:` line in it came from a gatekeeper's retag and waits for a review; links and ids merge themselves.\n # Auto-merge needs the checks to run, which a pull request opened with the default token does not get.\n - name: Merge by itself unless a status changes\n if: steps.commit.outputs.changed == 'true' && env.HOLOCRON_SYNC_TOKEN != ''\n env:\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n run: |\n if git diff HEAD~1 HEAD -U0 -- .notes docs/wiki | grep -Eq '^[+-]status:'; then\n echo \"The sync changes a status: it waits for a review.\"\n gh pr merge \"$BRANCH\" --disable-auto || true\n else\n gh pr merge \"$BRANCH\" --auto --squash\n fi\n\n # Tells Checkly this run finished (#2359, the `sync-specs` heartbeat). Last, and only on success, so a red or\n # missing run is what Checkly notices. Not for a dry run, nor when there is no Discord token (the job did nothing).\n # A no-op until the secret exists; the URL is a credential: it goes in through `env` only, is masked, and a failed\n # ping never fails the job.\n - name: Ping the heartbeat\n if: env.HOLOCRON_DISCORD_BOT_TOKEN != '' && env.DRY_RUN != 'true'\n env:\n PING_URL: ${{ secrets.HOLOCRON_HEARTBEAT_SYNC_SPECS }}\n run: |\n if [ -z \"$PING_URL\" ]; then\n echo \"::notice::HOLOCRON_HEARTBEAT_SYNC_SPECS is not set, so no heartbeat was sent.\"\n exit 0\n fi\n echo \"::add-mask::$PING_URL\"\n curl -fsS --retry 3 --max-time 10 -o /dev/null \"$PING_URL\" || echo \"::warning::The heartbeat ping failed.\"\n";
|
|
551
|
+
var sync_templates_default$1 = "name: Sync Templates\n\n# Builds the holocron CLI from source and pushes updated workflow templates\n# and composite actions to downstream .github repos, by pull request. Its caller\n# runs it whenever the template source files change on main or alpha. The\n# consumer repos are found first: every repo of the org with a holocron.config,\n# except `.github` and the repo this runs in.\n#\n# Secrets required:\n# HOLOCRON_SYNC_TOKEN — fine-grained PAT (resource owner: org) with:\n# Actions: Read and write (dispatch workflow runs via gh workflow run)\n# Contents: Read and write (git trees, blobs, refs)\n# Pull requests: Read and write (open sync PR)\n# Workflows: Read and write (write .github/workflows/*.yml)\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n primary-repo:\n description: >\n Primary .github repo — receives composite actions, reusable workflows,\n and thin-caller templates. Requires a PR (branch protection assumed).\n Empty means the `.github` repo of the owner the workflow runs in.\n type: string\n required: false\n default: \"\"\n secondary-repos:\n description: >\n Space-separated list of secondary repos (reusable workflows + thin\n callers only, no composite actions). Changes are delivered via pull\n request, same as the primary repo. Empty means every repo of the\n owner that has a holocron.config, found by code search.\n type: string\n required: false\n default: \"\"\n sync-branch:\n description: Branch name used for the primary and secondary repo PRs\n type: string\n required: false\n default: chore/sync-templates\n secrets:\n HOLOCRON_SYNC_TOKEN:\n required: true\n HOLOCRON_READ_TOKEN:\n description: >\n Fine-grained PAT for read-only GitHub API calls (e.g. resolving git\n committer identity via `gh api user`). Falls back to HOLOCRON_SYNC_TOKEN.\n required: false\n GH_TOKEN:\n description: >\n Generic GitHub token fallback for `gh` CLI calls. Used when neither\n HOLOCRON_READ_TOKEN nor HOLOCRON_SYNC_TOKEN is set.\n required: false\n HOLOCRON_AXIOM_TOKEN:\n description: >\n Axiom API token. When set alongside the HOLOCRON_AXIOM_DATASET\n repo/org variable, the CLI ships this run's structured logs to Axiom.\n Falls back to the vendor-native AXIOM_TOKEN secret.\n required: false\n AXIOM_TOKEN:\n description: Vendor-native fallback for HOLOCRON_AXIOM_TOKEN.\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n discover-repos:\n name: Discover consumer repos\n runs-on: ubuntu-latest\n timeout-minutes: 5\n permissions:\n contents: read\n outputs:\n secondary-repos: ${{ steps.find.outputs.secondary-repos }}\n steps:\n - name: Find repos with holocron.config\n id: find\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n OWNER: ${{ github.repository_owner }}\n GIVEN: ${{ inputs.secondary-repos }}\n THIS_REPO: ${{ github.repository }}\n run: |\n if [ -n \"$GIVEN\" ]; then\n echo \"secondary-repos=$GIVEN\" >> \"$GITHUB_OUTPUT\"\n exit 0\n fi\n # $ENV.OWNER and $ENV.THIS_REPO are jq's, read from the environment; the single quotes are meant.\n # shellcheck disable=SC2016\n repos=$(gh api \"search/code?q=filename:holocron.config+org:${OWNER}&per_page=100\" \\\n --jq '[.items[].repository.full_name]\n | unique\n | map(select(. != ($ENV.OWNER + \"/.github\") and . != $ENV.THIS_REPO))\n | join(\" \")')\n echo \"secondary-repos=$repos\" >> \"$GITHUB_OUTPUT\"\n\n sync:\n name: Sync templates\n needs: discover-repos\n runs-on: ubuntu-latest\n timeout-minutes: 15\n permissions:\n contents: read\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n HOLOCRON_AXIOM_TOKEN: ${{ secrets.HOLOCRON_AXIOM_TOKEN || secrets.AXIOM_TOKEN }}\n HOLOCRON_AXIOM_DATASET: ${{ vars.HOLOCRON_AXIOM_DATASET }}\n # The org variable is HOLOCRON_POSTHOG_PROJECT_TOKEN (bare POSTHOG_PROJECT_TOKEN until it is renamed).\n HOLOCRON_POSTHOG_PROJECT_TOKEN: ${{ vars.HOLOCRON_POSTHOG_PROJECT_TOKEN || vars.POSTHOG_PROJECT_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - run: pnpm build\n name: Build CLI\n\n # Resolve the built CLI from node_modules instead of hard-coding where it\n # lives in this repo (the same lookup the `holocron` composite action does).\n - name: Resolve CLI\n run: echo \"HOLOCRON_CLI=$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\" >> \"$GITHUB_ENV\"\n\n - name: Cache actionlint\n id: cache-actionlint\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: /tmp/actionlint\n key: actionlint-v1.7.7-linux-amd64\n\n - name: Download actionlint\n if: steps.cache-actionlint.outputs.cache-hit != 'true'\n run: |\n curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz \\\n | tar -xz -C /tmp actionlint\n\n - name: Validate generated workflows\n run: |\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --output-dir /tmp/sync-validate\n /tmp/actionlint /tmp/sync-validate/.github/workflows/*.yml\n env:\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n\n # The hosted reference, like the other actions: the action is new, so `theholocron/.github` has no copy and the reference\n # is rewritten to `theholocron/holocron/ci/actions/git-identity@ci-v1` (a `./` path would resolve in the caller's checkout).\n # `scope: none` leaves git's own config alone: the identity only goes into the Signed-off-by trailer below.\n - uses: theholocron/holocron/ci/actions/git-identity@ci-v1\n name: Resolve git identity\n id: identity\n with:\n scope: none\n resolve: \"true\"\n token: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n\n - name: Sync primary repo (PR)\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$PRIMARY_REPO\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$PRIMARY_REPO\" \"$SYNC_BRANCH\" 2>/dev/null || true\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n PRIMARY_REPO: ${{ inputs.primary-repo || format('{0}/.github', github.repository_owner) }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n\n - name: Sync secondary repos (PR)\n if: ${{ needs.discover-repos.outputs.secondary-repos != '' }}\n run: |\n COMMIT_MSG=\"chore: sync from $GITHUB_REPOSITORY\"$'\\n\\n'\"Signed-off-by: $GIT_NAME <$GIT_EMAIL>\"\n for repo in $SECONDARY_REPOS; do\n node \"$HOLOCRON_CLI\" sync github \\\n --repo \"$repo\" \\\n --branch \"$SYNC_BRANCH\" \\\n --pr \\\n --message \"$COMMIT_MSG\"\n GH_TOKEN=\"$HOLOCRON_SYNC_TOKEN\" gh pr merge --auto --squash \\\n --repo \"$repo\" \"$SYNC_BRANCH\" 2>/dev/null || true\n done\n env:\n GH_TOKEN: ${{ secrets.HOLOCRON_READ_TOKEN || secrets.HOLOCRON_SYNC_TOKEN || secrets.GH_TOKEN }}\n HOLOCRON_SYNC_TOKEN: ${{ secrets.HOLOCRON_SYNC_TOKEN }}\n SECONDARY_REPOS: ${{ needs.discover-repos.outputs.secondary-repos }}\n SYNC_BRANCH: ${{ inputs.sync-branch }}\n GIT_NAME: ${{ steps.identity.outputs.name }}\n GIT_EMAIL: ${{ steps.identity.outputs.email }}\n";
|
|
568
552
|
var tag_default = "name: Tag\n\n# Release Please — fully automated tag and GitHub Release from Conventional Commits.\n# No package.json or npm publishing required. Operates in \"simple\" mode by default:\n# analyzes commits since the last tag, maintains a rolling Release PR, and creates\n# a tag + GitHub Release when that PR is merged.\n#\n# The calling repo must have two files at the root:\n# release-please-config.json — declares packages and release-type\n# .release-please-manifest.json — tracks the current version\n\non: # yamllint disable-line rule:truthy\n # Self-trigger: when this workflow lives in theholocron/.github itself,\n # push to main runs Release Please for that repo's own releases.\n push:\n branches:\n - main\n workflow_call:\n inputs:\n release-type:\n description: Release Please release type (simple, node, python, etc.)\n type: string\n required: false\n default: simple\n config-file:\n description: Path to release-please-config.json\n type: string\n required: false\n default: release-please-config.json\n manifest-file:\n description: Path to .release-please-manifest.json\n type: string\n required: false\n default: .release-please-manifest.json\n\njobs:\n tag:\n name: Tag release\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1\n name: Run Release Please\n with:\n release-type: ${{ inputs.release-type }}\n config-file: ${{ inputs.config-file }}\n manifest-file: ${{ inputs.manifest-file }}\n";
|
|
569
|
-
var perf_default$1 = "name: Audit the Performance\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n lighthouse-config:\n description: >\n Path to the Lighthouse CI config file, forwarded to `holocron run\n verification.performance -- --config`. Defaults to\n lighthouse.config.cjs (the org standard).\n type: string\n required: false\n default: lighthouse.config.cjs\n secrets:\n HOLOCRON_LIGHTHOUSE_TOKEN:\n description: The Lighthouse CI GitHub App token. Read first; the LHCI_GITHUB_APP_TOKEN secret is the fallback.\n required: false\n LHCI_GITHUB_APP_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n performance:\n name: Run Lighthouse CI\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by `lhci autorun` inside `holocron run test:perf`.\n LHCI_GITHUB_APP_TOKEN: ${{ secrets.HOLOCRON_LIGHTHOUSE_TOKEN || secrets.LHCI_GITHUB_APP_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron
|
|
570
|
-
var unit_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n uploads:\n description: 'JSON list of {\"flag\", \"files\"} to upload one Codecov flag per group, e.g. [{\"flag\":\"utils\",\"files\":\"utils/*/coverage/lcov.info\"}]. Empty uploads all coverage as one report, as before.'\n type: string\n required: false\n default: \"\"\n run-unit:\n description: Run unit tests with coverage (disable for UI-only repos that use Storybook testing exclusively)\n type: boolean\n required: false\n default: true\n run-storybook:\n description: Run Storybook vitest interaction tests (requires .storybook/ setup)\n type: boolean\n required: false\n default: false\n run-interaction:\n description: Run Storybook interaction and accessibility tests with Playwright\n type: boolean\n required: false\n default: false\n run-user-flow:\n description: Run Cypress E2E user-flow tests (requires cypress.config.*)\n type: boolean\n required: false\n default: false\n wait-on-url:\n description: URL to wait for before running Cypress tests (default is Vite dev server; override for non-Vite stacks e.g. http://localhost:3000 for Next.js)\n type: string\n required: false\n default: \"http://localhost:5173\"\n secrets:\n CYPRESS_RECORD_KEY:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n unit:\n name: Run unit tests and collect coverage\n if: ${{ inputs.run-unit }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - uses: theholocron/.github/.github/actions/holocron@main\n name: Run tests with coverage\n with:\n task: test:unit\n affected: ${{ inputs.affected }}\n\n # With `affected`, a run that selects nothing (a README-only PR) writes no coverage. The two\n # required Codecov statuses still have to post, so say so with an empty upload instead of\n # failing the upload. Without `affected` a missing report stays an error.\n - id: reports\n name: Look for coverage and test reports\n if: ${{ inputs.affected }}\n shell: bash\n run: |\n # find, not hashFiles('**/…'): hashFiles walks node_modules and can time out in a large workspace.\n has() { [ -n \"$(find . -path ./node_modules -prune -o -path '*/node_modules' -prune -o -name \"$1\" -print -quit)\" ]; }\n has lcov.info && echo \"coverage=true\" >> \"$GITHUB_OUTPUT\" || echo \"coverage=false\" >> \"$GITHUB_OUTPUT\"\n has test-report.junit.xml && echo \"tests=true\" >> \"$GITHUB_OUTPUT\" || echo \"tests=false\" >> \"$GITHUB_OUTPUT\"\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n if: ${{ inputs.uploads == '' && (!inputs.affected || steps.reports.outputs.coverage == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n # One upload per group, each with its own flag, so Codecov can carry the unchanged groups forward.\n - id: flags\n name: Upload coverage to Codecov, one flag per group\n if: ${{ inputs.uploads != '' }}\n # The coverage provider's own command (`providers.coverage`), not the codecov-upload action. It is run\n # from the built CLI the test step above resolved, as the holocron action does, and not through that\n # action, so the JSON list reaches it as one argument (the action splits `args` on spaces) and the\n # `uploaded` output below stays a step output of this job. The job's OIDC token needs `id-token: write`.\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.affected }}\n run: |\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n set -- upload coverage --uploads \"$UPLOADS\"\n [ \"$ALLOW_EMPTY\" = \"true\" ] && set -- \"$@\" --allow-empty\n node \"$cli\" \"$@\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test results are Codecov's test analytics; no required status reads them, so a failed upload is logged\n # and the job passes. Coverage above still fails the job: the required statuses depend on it.\n if: ${{ !cancelled() && (!inputs.affected || steps.reports.outputs.tests == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Post the Codecov statuses without a report\n if: ${{ inputs.affected && (inputs.uploads == '' && steps.reports.outputs.coverage != 'true' || inputs.uploads != '' && steps.flags.outputs.uploaded == '0') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n run_command: empty-upload\n\n storybook:\n name: Run Storybook interaction tests\n if: ${{ inputs.run-storybook }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install chromium --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run Storybook tests\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test analytics only, as above: a failed upload is logged, not a failed job.\n if: ${{ !cancelled() }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n interaction-and-accessibility:\n name: Run interactions and accessibility tests\n if: ${{ inputs.run-interaction }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec playwright install --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run interaction and accessibility tests\n\n user-flow:\n name: Run user flow tests\n if: ${{ inputs.run-user-flow }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n strategy:\n fail-fast: false\n matrix:\n containers: [1, 2]\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/.github/.github/actions/setup@main\n name: Setup\n\n - run: pnpm exec cypress install\n name: Install Cypress binary\n\n - uses: cypress-io/github-action@0ed14f5d30c4ad6e5e8ffb6f57dbb69150137a3f # v7.4.10\n name: Cypress run\n with:\n start: pnpm dev\n wait-on: ${{ inputs.wait-on-url }}\n record: true\n parallel: true\n env:\n CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [unit, storybook, interaction-and-accessibility, user-flow]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
|
|
571
|
-
var visual_default$1 = "name: Visual Regression\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n chromatic-projects:\n description: >\n JSON array of Chromatic projects to build, one matrix job per entry.\n Each entry: { \"tokenName\": \"WEB\", \"workingDir\": \"apps/web\", \"buildScript\": \"build:storybook\" }.\n tokenName maps to secret CHROMATIC_PROJECT_TOKEN_<TOKENNAME>; use \"default\"\n (or omit for the legacy empty-string form) to use the bare CHROMATIC_PROJECT_TOKEN\n secret for single-project repos.\n buildScript defaults to \"build:storybook\" when omitted.\n Required -- this task only exists in a repo's workflow list when it\n opts into Chromatic at all (holocron#394/#1062): GitHub evaluates a\n job's `if:` before expanding its `strategy.matrix`, so no default\n here (empty or otherwise) can make a *disabled* Chromatic job\n disappear from PR checks -- only not generating this job's thin\n caller in the first place can. A repo that doesn't want Chromatic\n simply omits `verification.visualRegression` from its `tasks:`.\n type: string\n required: true\n secrets:\n CHROMATIC_PROJECT_TOKEN:\n required: false\n\njobs:\n visual-and-composition:\n name: Run visual and composition tests\n strategy:\n fail-fast: false\n matrix:\n project: ${{ fromJSON(inputs.chromatic-projects) }}\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
572
|
-
var typecheck_default$1 = "name: Typecheck\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n typecheck:\n name: Run tsc --noEmit\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron
|
|
553
|
+
var perf_default$1 = "name: Audit the Performance\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n lighthouse-config:\n description: >\n Path to the Lighthouse CI config file, forwarded to `holocron run\n verification.performance -- --config`. Defaults to\n lighthouse.config.cjs (the org standard).\n type: string\n required: false\n default: lighthouse.config.cjs\n secrets:\n HOLOCRON_LIGHTHOUSE_TOKEN:\n description: The Lighthouse CI GitHub App token. Read first; the LHCI_GITHUB_APP_TOKEN secret is the fallback.\n required: false\n LHCI_GITHUB_APP_TOKEN:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n performance:\n name: Run Lighthouse CI\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n # Read by `lhci autorun` inside `holocron run test:perf`.\n LHCI_GITHUB_APP_TOKEN: ${{ secrets.HOLOCRON_LIGHTHOUSE_TOKEN || secrets.LHCI_GITHUB_APP_TOKEN }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - run: npm install -g @lhci/cli@0.14.x\n name: Install Lighthouse CLI\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run Lighthouse CI\n with:\n task: test:perf\n args: --config=${{ inputs.lighthouse-config }}\n";
|
|
554
|
+
var unit_default$1 = "name: Test\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n uploads:\n description: 'JSON list of {\"flag\", \"files\"} to upload one Codecov flag per group, e.g. [{\"flag\":\"utils\",\"files\":\"utils/*/coverage/lcov.info\"}]. Empty uploads all coverage as one report, as before.'\n type: string\n required: false\n default: \"\"\n run-unit:\n description: Run unit tests with coverage (disable for UI-only repos that use Storybook testing exclusively)\n type: boolean\n required: false\n default: true\n run-storybook:\n description: Run Storybook vitest interaction tests (requires .storybook/ setup)\n type: boolean\n required: false\n default: false\n run-interaction:\n description: Run Storybook interaction and accessibility tests with Playwright\n type: boolean\n required: false\n default: false\n run-user-flow:\n description: Run Cypress E2E user-flow tests (requires cypress.config.*)\n type: boolean\n required: false\n default: false\n wait-on-url:\n description: URL to wait for before running Cypress tests (default is Vite dev server; override for non-Vite stacks e.g. http://localhost:3000 for Next.js)\n type: string\n required: false\n default: \"http://localhost:5173\"\n secrets:\n CYPRESS_RECORD_KEY:\n required: false\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n unit:\n name: Run unit tests and collect coverage\n if: ${{ inputs.run-unit }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run tests with coverage\n with:\n task: test:unit\n affected: ${{ inputs.affected }}\n\n # With `affected`, a run that selects nothing (a README-only PR) writes no coverage. The two\n # required Codecov statuses still have to post, so say so with an empty upload instead of\n # failing the upload. Without `affected` a missing report stays an error.\n - id: reports\n name: Look for coverage and test reports\n if: ${{ inputs.affected }}\n shell: bash\n run: |\n # find, not hashFiles('**/…'): hashFiles walks node_modules and can time out in a large workspace.\n has() { [ -n \"$(find . -path ./node_modules -prune -o -path '*/node_modules' -prune -o -name \"$1\" -print -quit)\" ]; }\n has lcov.info && echo \"coverage=true\" >> \"$GITHUB_OUTPUT\" || echo \"coverage=false\" >> \"$GITHUB_OUTPUT\"\n has test-report.junit.xml && echo \"tests=true\" >> \"$GITHUB_OUTPUT\" || echo \"tests=false\" >> \"$GITHUB_OUTPUT\"\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n if: ${{ inputs.uploads == '' && (!inputs.affected || steps.reports.outputs.coverage == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n # One upload per group, each with its own flag, so Codecov can carry the unchanged groups forward.\n - id: flags\n name: Upload coverage to Codecov, one flag per group\n if: ${{ inputs.uploads != '' }}\n # The coverage provider's own command (`providers.coverage`), not the codecov-upload action. It is run\n # from the built CLI the test step above resolved, as the holocron action does, and not through that\n # action, so the JSON list reaches it as one argument (the action splits `args` on spaces) and the\n # `uploaded` output below stays a step output of this job. The job's OIDC token needs `id-token: write`.\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.affected }}\n run: |\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n set -- upload coverage --uploads \"$UPLOADS\"\n [ \"$ALLOW_EMPTY\" = \"true\" ] && set -- \"$@\" --allow-empty\n node \"$cli\" \"$@\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test results are Codecov's test analytics; no required status reads them, so a failed upload is logged\n # and the job passes. Coverage above still fails the job: the required statuses depend on it.\n if: ${{ !cancelled() && (!inputs.affected || steps.reports.outputs.tests == 'true') }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Post the Codecov statuses without a report\n if: ${{ inputs.affected && (inputs.uploads == '' && steps.reports.outputs.coverage != 'true' || inputs.uploads != '' && steps.flags.outputs.uploaded == '0') }}\n with:\n use_oidc: true\n fail_ci_if_error: true\n run_command: empty-upload\n\n storybook:\n name: Run Storybook interaction tests\n if: ${{ inputs.run-storybook }}\n permissions:\n contents: read\n id-token: write\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - run: pnpm exec playwright install chromium --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run Storybook tests\n\n # A Codecov upload must not fail silently. fail_ci_if_error makes a failed\n # upload fail this step (the action's default is to log the error and pass),\n # which fails the job and so the `Test / Conclusion` check. Whether that\n # blocks a merge is up to whether the check is required, not this workflow\n # (holocron#934).\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload coverage to Codecov\n with:\n use_oidc: true\n fail_ci_if_error: true\n\n - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1\n name: Upload test results to Codecov\n # Test analytics only, as above: a failed upload is logged, not a failed job.\n if: ${{ !cancelled() }}\n with:\n use_oidc: true\n fail_ci_if_error: false\n report_type: test_results\n files: \"**/test-report.junit.xml\"\n\n interaction-and-accessibility:\n name: Run interactions and accessibility tests\n if: ${{ inputs.run-interaction }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - run: pnpm exec playwright install --with-deps\n name: Install Playwright\n\n - run: pnpm test:storybook\n name: Run interaction and accessibility tests\n\n user-flow:\n name: Run user flow tests\n if: ${{ inputs.run-user-flow }}\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n strategy:\n fail-fast: false\n matrix:\n containers: [1, 2]\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - run: pnpm exec cypress install\n name: Install Cypress binary\n\n - uses: cypress-io/github-action@0ed14f5d30c4ad6e5e8ffb6f57dbb69150137a3f # v7.4.10\n name: Cypress run\n with:\n start: pnpm dev\n wait-on: ${{ inputs.wait-on-url }}\n record: true\n parallel: true\n env:\n CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n conclusion:\n name: Conclusion\n runs-on: ubuntu-latest\n if: always()\n needs: [unit, storybook, interaction-and-accessibility, user-flow]\n steps:\n - name: Check job statuses\n run: |\n if [[ \"$RESULTS\" == *\"failure\"* ]] || [[ \"$RESULTS\" == *\"cancelled\"* ]]; then\n exit 1\n fi\n env:\n RESULTS: ${{ join(needs.*.result, ',') }}\n";
|
|
555
|
+
var visual_default$1 = "name: Visual Regression\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n chromatic-projects:\n description: >\n JSON array of Chromatic projects to build, one matrix job per entry.\n Each entry: { \"tokenName\": \"WEB\", \"workingDir\": \"apps/web\", \"buildScript\": \"build:storybook\" }.\n tokenName maps to secret CHROMATIC_PROJECT_TOKEN_<TOKENNAME>; use \"default\"\n (or omit for the legacy empty-string form) to use the bare CHROMATIC_PROJECT_TOKEN\n secret for single-project repos.\n buildScript defaults to \"build:storybook\" when omitted.\n Required -- this task only exists in a repo's workflow list when it\n opts into Chromatic at all (holocron#394/#1062): GitHub evaluates a\n job's `if:` before expanding its `strategy.matrix`, so no default\n here (empty or otherwise) can make a *disabled* Chromatic job\n disappear from PR checks -- only not generating this job's thin\n caller in the first place can. A repo that doesn't want Chromatic\n simply omits `verification.visualRegression` from its `tasks:`.\n type: string\n required: true\n secrets:\n CHROMATIC_PROJECT_TOKEN:\n required: false\n\njobs:\n visual-and-composition:\n name: Run visual and composition tests\n strategy:\n fail-fast: false\n matrix:\n project: ${{ fromJSON(inputs.chromatic-projects) }}\n permissions:\n contents: read\n statuses: write\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: chromaui/action@0a7067e5ffc663a631b14db505d8a94b26e1bf2f # v18\n name: Publish to Chromatic\n with:\n projectToken: ${{ (matrix.project.tokenName == 'default' || matrix.project.tokenName == '') && secrets.CHROMATIC_PROJECT_TOKEN || secrets[format('CHROMATIC_PROJECT_TOKEN_{0}', matrix.project.tokenName)] }}\n token: ${{ github.token }}\n buildScriptName: ${{ matrix.project.buildScript || 'build:storybook' }}\n workingDir: ${{ matrix.project.workingDir || '.' }}\n storybookBaseDir: ${{ matrix.project.storybookBaseDir || '' }}\n untraced: ${{ matrix.project.untraced || '' }}\n onlyStoryFiles: ${{ matrix.project.onlyStoryFiles || '' }}\n exitZeroOnChanges: ${{ matrix.project.exitZeroOnChanges || false }}\n";
|
|
556
|
+
var typecheck_default$1 = "name: Typecheck\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n inputs:\n affected:\n description: Run only the packages changed since the PR base, plus their dependents (turbo --affected). Needs a turbo.json; checks out full history. Other repos keep today's behaviour while this is false.\n type: boolean\n required: false\n default: false\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n typecheck:\n name: Run tsc --noEmit\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n env:\n TURBO_TOKEN: ${{ secrets.HOLOCRON_TURBO_TOKEN || secrets.TURBO_TOKEN }}\n TURBO_TEAM: ${{ vars.HOLOCRON_TURBO_TEAM || vars.TURBO_TEAM }}\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n # --affected needs the base commit, which a depth-1 checkout does not have.\n fetch-depth: ${{ inputs.affected && '0' || '1' }}\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Type check\n with:\n task: typecheck\n affected: ${{ inputs.affected }}\n";
|
|
573
557
|
var update_deps_default$1 = "name: Dependencies\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n merge-token:\n description: >\n Optional privileged token for auto-merge. Falls back to GITHUB_TOKEN.\n Required when branch protection enforces required reviews — GITHUB_TOKEN\n cannot approve its own PRs.\n required: false\n\njobs:\n dependabot:\n name: Update the dependencies\n permissions:\n contents: write\n pull-requests: write\n runs-on: ubuntu-latest\n timeout-minutes: 5\n if: github.event.pull_request.user.login == 'dependabot[bot]'\n steps:\n - uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0\n name: Fetch Dependabot metadata\n id: metadata\n\n - run: gh pr merge --auto --squash \"$PR_URL\"\n # --squash is intentional: repo protection sets allow_merge_commit: false,\n # so --merge would fail on any repo using the standard preset.\n name: Enable auto-merge for Dependabot PRs\n if: steps.metadata.outputs.update-type == 'version-update:semver-patch'\n env:\n PR_URL: ${{ github.event.pull_request.html_url }}\n GH_TOKEN: ${{ secrets.merge-token || github.token }}\n";
|
|
574
|
-
var deps_default$1 = "name: Validate Dependency Catalogs\n\n# Dependency catalogs (#1380): fails when a workspace package.json breaks the catalog rule written at the top of\n# pnpm-workspace.yaml (a hard-coded version, a workspace package pinned to a version, a dependency in the wrong\n# catalog or an unused catalog entry). Checked by `holocron probe deps check`, which reads the manifests live.\n#\n# There is deliberately no `paths:` filter in a caller: a required check that is skipped blocks the merge.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-deps:\n name: Check dependency catalogs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
575
|
-
var docs_default$2 = "name: Validate Docs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-docs:\n name: Validate docs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
576
|
-
var generated_default$1 = "name: Validate Generated Files\n\n# Generated files (#1405): fails when a file `holocron setup` / `holocron sync` writes from the config\n# differs from the committed copy, differs the second time it is generated, or when a workflow in .github/workflows is\n# neither generated nor marked \"# HAND-MAINTAINED\". Checked by `holocron probe generated check`, which needs no token.\n#\n# There is deliberately no `paths:` filter in a caller: a required check that is skipped blocks the merge.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-generated:\n name: Check generated files\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
577
|
-
var specs_default$1 = "name: Validate Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-specs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron
|
|
558
|
+
var deps_default$1 = "name: Validate Dependency Catalogs\n\n# Dependency catalogs (#1380): fails when a workspace package.json breaks the catalog rule written at the top of\n# pnpm-workspace.yaml (a hard-coded version, a workspace package pinned to a version, a dependency in the wrong\n# catalog or an unused catalog entry). Checked by `holocron probe deps check`, which reads the manifests live.\n#\n# There is deliberately no `paths:` filter in a caller: a required check that is skipped blocks the merge.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-deps:\n name: Check dependency catalogs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Check the dependency catalogs\n with:\n task: validate:deps\n";
|
|
559
|
+
var docs_default$2 = "name: Validate Docs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-docs:\n name: Validate docs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Validate docs\n with:\n task: validate:docs\n env:\n HOLOCRON_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n # The PR title and description, read by the script for a `feat` and a `[skip docs] <reason>` marker. They\n # reach the script through the environment, never inline in a command.\n HOLOCRON_PR_TITLE: ${{ github.event.pull_request.title }}\n HOLOCRON_PR_BODY: ${{ github.event.pull_request.body }}\n # The bare names stay until every caller's CLI reads the prefixed ones (#1864); a CLI that predates them\n # reads only these.\n BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}\n PR_TITLE: ${{ github.event.pull_request.title }}\n PR_BODY: ${{ github.event.pull_request.body }}\n";
|
|
560
|
+
var generated_default$1 = "name: Validate Generated Files\n\n# Generated files (#1405): fails when a file `holocron setup` / `holocron sync` writes from the config\n# differs from the committed copy, differs the second time it is generated, or when a workflow in .github/workflows is\n# neither generated nor marked \"# HAND-MAINTAINED\". Checked by `holocron probe generated check`, which needs no token.\n#\n# There is deliberately no `paths:` filter in a caller: a required check that is skipped blocks the merge.\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-generated:\n name: Check generated files\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 15\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Check the generated files\n with:\n task: validate:generated\n";
|
|
561
|
+
var specs_default$1 = "name: Validate Specs\n\non: # yamllint disable-line rule:truthy\n workflow_call:\n secrets:\n HOLOCRON_TURBO_TOKEN:\n description: The Turbo remote cache token. Read first; the TURBO_TOKEN secret is the fallback.\n required: false\n TURBO_TOKEN:\n required: false\n\njobs:\n validate-specs:\n name: Validate ADRs and specs\n permissions:\n contents: read\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1\n name: Checkout repository\n with:\n fetch-depth: 0\n\n - uses: theholocron/holocron/ci/actions/setup@ci-v1\n name: Setup\n\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Validate ADR and spec frontmatter\n with:\n task: validate:specs\n";
|
|
578
562
|
var action_default$8 = "name: Auto Commit\ndescription: >\n Commit and push any file changes using stefanzweifel/git-auto-commit-action.\n If a branch name is provided and differs from the current branch, a new branch\n is created automatically.\n\ninputs:\n token:\n description: >\n GitHub token with push access to the target branch. Used to authenticate\n the git remote so the commit can be pushed.\n required: true\n branch:\n description: >\n Branch to commit to. Leave empty to commit to the current branch (useful\n in PR contexts). Provide an explicit name (e.g. chore/auto-sync-<sha>) to push\n to a separate branch.\n required: false\n default: \"\"\n commit-message:\n description: Commit message.\n required: true\n commit-options:\n description: >\n Additional options passed to git commit (e.g. --no-verify).\n required: false\n default: \"\"\n commit-user-name:\n description: Git user.name for the commit.\n required: false\n default: \"github-actions[bot]\"\n commit-user-email:\n description: Git user.email for the commit.\n required: false\n default: \"41898282+github-actions[bot]@users.noreply.github.com\"\n commit-author:\n description: >\n Git author string in \"Name <email>\" format.\n required: false\n default: \"github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>\"\n\noutputs:\n changes-detected:\n description: \"'true' if any files were committed, 'false' otherwise.\"\n value: ${{ steps.commit.outputs.changes_detected }}\n\nruns:\n using: composite\n steps:\n - name: Configure git remote with token\n shell: bash\n run: |\n REMOTE_URL=$(git remote get-url origin)\n AUTHED_URL=$(echo \"$REMOTE_URL\" | sed \"s|https://|https://x-access-token:${TOKEN}@|\")\n git remote set-url origin \"$AUTHED_URL\"\n env:\n TOKEN: ${{ inputs.token }}\n\n - name: Reset branch to current HEAD\n if: ${{ inputs.branch != '' }}\n shell: bash\n run: git checkout -B \"$BRANCH\"\n env:\n BRANCH: ${{ inputs.branch }}\n\n - name: Build signed commit message\n id: msg\n shell: bash\n run: |\n TRAILER=\"Signed-off-by: ${COMMIT_USER_NAME} <${COMMIT_USER_EMAIL}>\"\n if echo \"$COMMIT_MESSAGE\" | grep -qF \"$TRAILER\"; then\n FINAL=\"$COMMIT_MESSAGE\"\n else\n FINAL=\"${COMMIT_MESSAGE}\"$'\\n\\n'\"${TRAILER}\"\n fi\n {\n echo \"value<<EOF_TRAILER\"\n printf '%s' \"$FINAL\"\n echo \"\"\n echo \"EOF_TRAILER\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n COMMIT_MESSAGE: ${{ inputs.commit-message }}\n COMMIT_USER_NAME: ${{ inputs.commit-user-name }}\n COMMIT_USER_EMAIL: ${{ inputs.commit-user-email }}\n\n - uses: stefanzweifel/git-auto-commit-action@d0b01107b5db882071f96de5dd4b54961ea93f4c # v7.2.1\n id: commit\n with:\n branch: ${{ inputs.branch }}\n commit_message: ${{ steps.msg.outputs.value }}\n commit_options: ${{ inputs.commit-options }}\n commit_user_name: ${{ inputs.commit-user-name }}\n commit_user_email: ${{ inputs.commit-user-email }}\n commit_author: ${{ inputs.commit-author }}\n";
|
|
579
563
|
var action_default$7 = "name: Codecov upload\ndescription: >\n Upload coverage to Codecov with one flag per group, authenticated with the job's OIDC token (the job\n needs `id-token: write`). Downloads the Codecov CLI and verifies its GPG signature and checksum first,\n as `codecov/codecov-action` does. `codecov-action` takes one `flags:` value per step and a job cannot\n generate steps, so a list of groups needs this loop.\n\ninputs:\n uploads:\n description: >\n JSON list of `{\"flag\": \"utils\", \"files\": \"utils/*/coverage/lcov.info\"}`. `files` is a glob relative to\n the workspace. A group whose glob matches nothing is skipped with a note, not an error.\n required: true\n allow-empty:\n description: >\n `\"true\"` lets a run with no coverage file in any group finish quietly (an affected run that selected\n nothing). Otherwise that is an error, so a missing report is not mistaken for a pass.\n required: false\n default: \"false\"\n\noutputs:\n uploaded:\n description: How many flags were uploaded (0 when no group had a coverage file).\n value: ${{ steps.upload.outputs.uploaded }}\n\nruns:\n using: composite\n\n steps:\n - name: Download the Codecov CLI\n shell: bash\n run: |\n set -euo pipefail\n dir=\"$RUNNER_TEMP/codecov-cli\"\n mkdir -p \"$dir\" && cd \"$dir\"\n base=https://cli.codecov.io/latest/linux\n curl -sSf --retry 3 -o codecov \"$base/codecov\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM\"\n curl -sSf --retry 3 -O \"$base/codecov.SHA256SUM.sig\"\n export GNUPGHOME=\"$dir/gnupg\" && mkdir -m 700 \"$GNUPGHOME\"\n curl -sSf --retry 3 https://keybase.io/codecovsecops/pgp_keys.asc | gpg --batch --import\n gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM\n sha256sum -c codecov.SHA256SUM\n chmod +x codecov\n echo \"CODECOV_CLI=$dir/codecov\" >> \"$GITHUB_ENV\"\n\n - name: Upload each flag\n id: upload\n shell: bash\n env:\n UPLOADS: ${{ inputs.uploads }}\n ALLOW_EMPTY: ${{ inputs.allow-empty }}\n run: |\n set -euo pipefail\n if [ -z \"${ACTIONS_ID_TOKEN_REQUEST_URL:-}\" ]; then\n echo \"::error::No OIDC token available: give the job \\`permissions: id-token: write\\`.\"\n exit 1\n fi\n if ! jq -e 'type == \"array\" and all(.[]; (.flag // \"\") != \"\" and (.files // \"\") != \"\")' <<<\"$UPLOADS\" >/dev/null; then\n echo \"::error::uploads must be a JSON list of {\\\"flag\\\", \\\"files\\\"} with both set.\"\n exit 1\n fi\n # The token codecov-action asks for with `use_oidc: true`. It is short-lived (about five minutes), and\n # about eighty uploads take longer than that, so it is fetched again before every upload: a token reused\n # past its life is answered with \"Repository not found\".\n fetch_token() {\n token=\"$(curl -sSf -H \"Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN\" \\\n \"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://codecov.io\" | jq -r .value)\"\n if [ -z \"$token\" ] || [ \"$token\" = null ]; then\n echo \"::error::Could not get an OIDC token.\"\n return 1\n fi\n echo \"::add-mask::$token\"\n }\n fetch_token || exit 1\n # What codecov-action does before it uploads: tell Codecov about the commit and open the report that\n # the per-flag uploads attach to. Uploading alone leaves the report unprocessed and posts no status.\n \"$CODECOV_CLI\" create-commit -t \"$token\" --fail-on-error --git-service github\n \"$CODECOV_CLI\" create-report -t \"$token\" --fail-on-error --git-service github\n # A package's report names its files from the package (`SF:src/index.ts`), and Codecov places a path by\n # matching it against the whole repo. `src/index.ts` exists in dozens of packages, so a package whose files\n # are all named like another's cannot be placed and its upload is rejected as an unusable report. Each report\n # is uploaded as a copy whose paths start at the repo root (`SF:clients/doppler-client/src/index.ts`). The\n # package is the report's folder, less a trailing `coverage`; a report at the repo root is left as it is.\n reports=\"$(mktemp -d \"${RUNNER_TEMP:-/tmp}/codecov-reports.XXXXXX\")\"\n rooted_copy() {\n local dir\n dir=\"$(dirname \"$1\")\"\n dir=\"${dir%/coverage}\"\n case \"$dir\" in . | coverage) dir=\"\" ;; esac\n if [ -n \"$dir\" ]; then\n awk -v prefix=\"$dir/\" '/^SF:/ && substr($0, 4, 1) != \"/\" { $0 = \"SF:\" prefix substr($0, 4) } { print }' \"$1\" > \"$2\"\n else\n cp \"$1\" \"$2\"\n fi\n }\n uploaded=0\n # Read the list on fd 3: the loop body must not share stdin with the CLI, which could swallow the\n # remaining entries. A process substitution (not a pipe) keeps `uploaded` in this shell.\n while read -r entry <&3; do\n flag=\"$(jq -r .flag <<<\"$entry\")\"\n mapfile -t files < <(compgen -G \"$(jq -r .files <<<\"$entry\")\" || true)\n if [ \"${#files[@]}\" -eq 0 ]; then\n echo \"· $flag: no coverage files\"\n continue\n fi\n args=()\n n=0\n for f in \"${files[@]}\"; do\n # A report that names no source file (a package with nothing to cover) is rejected as empty.\n if ! grep -q '^SF:' \"$f\"; then\n echo \"· $flag: $f names no source file, left out\"\n continue\n fi\n n=$((n + 1))\n rooted_copy \"$f\" \"$reports/$flag.$n.info\"\n args+=(--file \"$reports/$flag.$n.info\")\n done\n if [ \"$n\" -eq 0 ]; then\n echo \"· $flag: no coverage files\"\n continue\n fi\n echo \"→ $flag: $n file(s)\"\n # A fresh token for each try, then a few tries: Codecov also answers an upload with a 5xx now and then.\n attempt=1\n until fetch_token && \"$CODECOV_CLI\" do-upload -t \"$token\" --flag \"$flag\" --disable-search --fail-on-error --git-service github \"${args[@]}\"; do\n if [ \"$attempt\" -ge 4 ]; then\n echo \"::error::Codecov rejected the $flag upload $attempt times.\"\n exit 1\n fi\n wait=$((attempt * 15))\n echo \"::warning::$flag upload failed (attempt $attempt of 4); trying again in ${wait}s.\"\n sleep \"$wait\"\n attempt=$((attempt + 1))\n done\n uploaded=$((uploaded + 1))\n done 3< <(jq -c '.[]' <<<\"$UPLOADS\")\n echo \"uploaded=$uploaded\" >> \"$GITHUB_OUTPUT\"\n if [ \"$uploaded\" -eq 0 ] && [ \"$ALLOW_EMPTY\" != \"true\" ]; then\n echo \"::error::No group has a coverage file, so nothing was uploaded.\"\n exit 1\n fi\n";
|
|
580
|
-
var action_default$6 = "name: Format\ndescription: >\n Check the formatting with prettier (`holocron run format --check`). `format` is\n not a workflow of its own: a lint workflow that has already run the setup action\n and checked the repository out calls this (`lint:code` does).\n\nruns:\n using: composite\n steps:\n - uses: theholocron
|
|
564
|
+
var action_default$6 = "name: Format\ndescription: >\n Check the formatting with prettier (`holocron run format --check`). `format` is\n not a workflow of its own: a lint workflow that has already run the setup action\n and checked the repository out calls this (`lint:code` does).\n\nruns:\n using: composite\n steps:\n - uses: theholocron/holocron/ci/actions/holocron@ci-v1\n name: Run prettier\n with:\n task: format\n args: --check\n";
|
|
581
565
|
var action_default$5 = "name: Git identity\ndescription: >\n Resolve the git identity a workflow commits as (the identity of the token's\n user, else the github-actions bot) and, by default, configure git with it.\n The one place the bot's name and its fixed GitHub id are written down.\n\ninputs:\n scope:\n description: >\n Where to write the identity: `local` (the repository's config), `global`,\n or `none` to only expose the `name` and `email` outputs.\n required: false\n default: local\n resolve:\n description: >\n Take the name and email of the user the `token` belongs to (`gh api user`),\n falling back to the bot when that fails (an App installation token has no user).\n required: false\n default: \"false\"\n token:\n description: Token `gh api user` reads with when `resolve` is true.\n required: false\n default: ${{ github.token }}\n signoff:\n description: Set `format.signoff` so every commit carries a Signed-off-by trailer.\n required: false\n default: \"false\"\n\noutputs:\n name:\n description: The git user.name.\n value: ${{ steps.identity.outputs.name }}\n email:\n description: The git user.email.\n value: ${{ steps.identity.outputs.email }}\n\nruns:\n using: composite\n steps:\n - name: Configure git identity\n id: identity\n shell: bash\n run: |\n # 41898282 is GitHub's fixed id for the github-actions bot.\n BOT_NAME=\"github-actions[bot]\"\n BOT_EMAIL=\"41898282+github-actions[bot]@users.noreply.github.com\"\n GIT_NAME=\"$BOT_NAME\"\n GIT_EMAIL=\"$BOT_EMAIL\"\n if [ \"$RESOLVE\" = \"true\" ]; then\n GIT_NAME=$(gh api user --jq .name 2>/dev/null || echo \"$BOT_NAME\")\n GIT_EMAIL=$(gh api user --jq '\"\\(.id)+\\(.login)@users.noreply.github.com\"' 2>/dev/null || echo \"$BOT_EMAIL\")\n fi\n case \"$SCOPE\" in\n none) ;;\n local | global)\n git config \"--$SCOPE\" user.name \"$GIT_NAME\"\n git config \"--$SCOPE\" user.email \"$GIT_EMAIL\"\n if [ \"$SIGNOFF\" = \"true\" ]; then git config \"--$SCOPE\" format.signoff true; fi\n ;;\n *)\n echo \"::error::scope must be local, global or none, got '$SCOPE'\"\n exit 1\n ;;\n esac\n {\n echo \"name=$GIT_NAME\"\n echo \"email=$GIT_EMAIL\"\n } >> \"$GITHUB_OUTPUT\"\n env:\n SCOPE: ${{ inputs.scope }}\n RESOLVE: ${{ inputs.resolve }}\n SIGNOFF: ${{ inputs.signoff }}\n GH_TOKEN: ${{ inputs.token }}\n";
|
|
582
566
|
var action_default$4 = "name: Holocron\ndescription: >\n Run the Holocron CLI — `holocron run <task>` by default, or any other\n subcommand via `command:` (`sync`, `sync github`, …). Resolves\n `@theholocron/cli` from `node_modules` (published tarball) or builds it from\n source when it resolves to an unbuilt workspace checkout (the holocron repo\n itself). Requires dependencies to be installed already (run the setup action\n first).\n\ninputs:\n command:\n description: >\n Holocron subcommand. Default `run` — then `task` (and optional `job`,\n a further word of the task name or an argument for it) names the manifest task. Set to `sync` / `sync github` / … to run that\n subcommand directly; `args` becomes everything after it.\n required: false\n default: run\n task:\n description: >\n Manifest task to run when command is run — typecheck, test, build, audit.\n required: false\n default: \"\"\n job:\n description: Optional word after the task, part of its name or an argument for it (e.g. `unit` in `test unit`).\n required: false\n default: \"\"\n affected:\n description: >\n For `command: run`, only run the packages changed since the PR base (or the\n merge-base with the default branch), plus their dependents: `--affected`.\n Needs a checkout with enough history to reach the base (`fetch-depth: 0`);\n without it holocron logs a warning and runs everything.\n required: false\n default: \"false\"\n args:\n description: >\n For `command: run`, extra arguments forwarded to the tool after `--`.\n For any other command, the arguments passed straight to it.\n required: false\n default: \"\"\n\noutputs:\n log-file:\n description: >\n Path to a file holding the full captured stdout+stderr of this\n invocation — the same text the live Actions log shows, saved for a\n caller that wants to ship it elsewhere (e.g. Sentinel's dispatched\n checks shipping it to Axiom, holocron#769/#794).\n value: ${{ steps.run.outputs.log-file }}\n\nruns:\n using: composite\n\n steps:\n - name: Build the workspace when the CLI resolves to an unbuilt checkout\n shell: bash\n # The holocron repo carries @theholocron/cli as `workspace:*`; its bin\n # (dist/cli.mjs) does not exist on a fresh checkout. `pnpm build` is a\n # turbo run — cached and cheap once warm. A no-op everywhere else, where\n # the published tarball already ships dist/.\n #\n # pnpm creates every workspace package's node_modules/.bin/holocron shim\n # once, during the setup action's earlier `pnpm install` — before this\n # build has run, so every one of them is silently skipped (\"Failed to\n # create bin ... ENOENT\"), not just @theholocron/cli's own. That's a\n # one-time decision: a later build doesn't retroactively fix a shim that\n # was never created. Re-running `pnpm install` here (fast — the lockfile\n # hasn't changed, so it only re-links `.bin`) is what actually fixes it,\n # confirmed against a real cold install: `holocron` stays unresolvable\n # from inside any package until this second install runs.\n run: |\n if [ ! -f node_modules/@theholocron/cli/dist/cli.mjs ]; then\n echo \"→ @theholocron/cli dist/ missing — building the workspace from source\" >&2\n pnpm build\n echo \"→ re-linking node_modules/.bin — pnpm skipped it pre-build\" >&2\n pnpm install --frozen-lockfile\n fi\n\n - name: holocron ${{ inputs.command }} ${{ inputs.task }}\n id: run\n shell: bash\n env:\n HOLOCRON_COMMAND: ${{ inputs.command }}\n HOLOCRON_TASK: ${{ inputs.task }}\n HOLOCRON_JOB: ${{ inputs.job }}\n HOLOCRON_ARGS: ${{ inputs.args }}\n HOLOCRON_AFFECTED: ${{ inputs.affected }}\n HOLOCRON_PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}\n HOLOCRON_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}\n run: |\n if [ \"$HOLOCRON_COMMAND\" = \"run\" ]; then\n set -- run \"$HOLOCRON_TASK\"\n [ -n \"$HOLOCRON_JOB\" ] && set -- \"$@\" \"$HOLOCRON_JOB\"\n if [ \"$HOLOCRON_AFFECTED\" = \"true\" ]; then\n # A pull request compares against its base commit. Any other trigger\n # (a push to a PR branch) compares against where the branch left the\n # default branch. If neither resolves, no --base is passed and holocron\n # runs everything.\n base=\"$HOLOCRON_PR_BASE_SHA\"\n if [ -z \"$base\" ] && [ -n \"$HOLOCRON_DEFAULT_BRANCH\" ]; then\n git fetch --no-tags --quiet origin \"$HOLOCRON_DEFAULT_BRANCH\" || true\n base=\"$(git merge-base HEAD \"origin/$HOLOCRON_DEFAULT_BRANCH\" 2>/dev/null || true)\"\n fi\n set -- \"$@\" --affected\n [ -n \"$base\" ] && set -- \"$@\" --base \"$base\"\n fi\n # shellcheck disable=SC2086\n [ -n \"$HOLOCRON_ARGS\" ] && set -- \"$@\" -- $HOLOCRON_ARGS\n else\n # `command` may be a multi-word path (`sync`, `deploy on-release`):\n # word-split it so each token is its own argument.\n # shellcheck disable=SC2086\n set -- $HOLOCRON_COMMAND $HOLOCRON_ARGS\n fi\n # Invoke the built entry directly. `pnpm exec holocron` relies on a\n # node_modules/.bin/holocron shim that pnpm does not create for a\n # workspace package whose dist/ was absent at install time (the holocron\n # repo itself). Resolving the package's main export gives dist/index.mjs;\n # the bin sits next to it as dist/cli.mjs. This is `require.resolve` from\n # node_modules — it works in the holocron monorepo AND in every consumer\n # repo (theholocron/holocron#655), unlike a hard-coded `cli/cli/…`.\n cli=\"$(dirname \"$(node -e 'process.stdout.write(require.resolve(\"@theholocron/cli\"))')\")/cli.mjs\"\n if [ ! -f \"$cli\" ]; then\n echo \"::error::@theholocron/cli entry not found at $cli — is the workspace built?\" >&2\n exit 1\n fi\n echo \"→ $cli $*\" >&2\n # `tee` keeps the live Actions log streaming exactly as before while\n # also capturing it to a file callers can ship elsewhere (log-file\n # output, above). PIPESTATUS[0] -- not $? -- is `node`'s own exit\n # code; $? after a pipe is tee's, which succeeds even when node fails.\n log_file=\"${RUNNER_TEMP}/holocron-output.log\"\n node \"$cli\" \"$@\" 2>&1 | tee \"$log_file\"\n exit_code=${PIPESTATUS[0]}\n echo \"log-file=$log_file\" >> \"$GITHUB_OUTPUT\"\n exit \"$exit_code\"\n";
|
|
583
567
|
var action_default$3 = "name: Install dependencies\ndescription: Install project dependencies with pnpm frozen lockfile.\n\nruns:\n using: composite\n\n steps:\n - name: Install dependencies\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n shell: bash\n run: pnpm install --frozen-lockfile\n";
|
|
584
568
|
var action_default$2 = "name: Notify\ndescription: >\n Post a message to a chat channel through an incoming webhook. The request\n body is Discord-compatible (`content`, `username`, `flags`, `allowed_mentions`),\n so the webhook must accept that shape. Links in the message show no preview card\n (`flags` 4, suppress embeds). Does nothing (and never fails the\n calling job) when no webhook is provided, so repos that haven't set one up\n are unaffected. Set `strict` for a check whose only purpose is to prove the\n notification works: it then fails when the webhook is missing or rejects the post.\n\ninputs:\n webhook:\n description: >\n Incoming webhook URL for the target channel.\n A webhook posts to exactly one channel, so pass the secret for the\n channel this message belongs in (for example\n `secrets.HOLOCRON_NOTIFY_WEBHOOK_ALERTS`). Empty = skip.\n required: false\n default: \"\"\n message:\n description: Message text. Truncated to 2000 characters.\n required: true\n mention:\n description: >\n Optional role id (digits only) to ping. Only that one role can\n be mentioned; anything else in the message never pings.\n required: false\n default: \"\"\n username:\n description: Display name for the post.\n required: false\n default: \"Holocron\"\n strict:\n description: >\n \"true\" fails the step when no webhook is set or the post is rejected.\n Off by default: a notification problem must never fail the job it reports on.\n required: false\n default: \"false\"\n\nruns:\n using: composite\n steps:\n - name: Post the notification\n shell: bash\n run: |\n if [ -z \"$WEBHOOK\" ]; then\n if [ \"$STRICT\" = \"true\" ]; then\n echo \"::error::No notification webhook set.\"\n exit 1\n fi\n echo \"::notice::No notification webhook set — skipping notification.\"\n exit 0\n fi\n echo \"::add-mask::$WEBHOOK\"\n # allowed_mentions.parse = [] so message text can never ping @everyone\n # or a role; only the explicit `mention` role id is allowed through. The\n # body is built with jq so quotes/newlines in the message can't break the JSON.\n content=\"$MESSAGE\"\n roles='[]'\n # A mention that is not a role id is dropped, which is right for a real\n # notification but would let a check pass without ever pinging anyone.\n if [ \"$STRICT\" = \"true\" ] && [ -n \"$MENTION\" ] && ! [[ \"$MENTION\" =~ ^[0-9]+$ ]]; then\n echo \"::error::The mention is not a role id (digits only).\"\n exit 1\n fi\n if [[ \"$MENTION\" =~ ^[0-9]+$ ]]; then\n content=\"<@&$MENTION> $MESSAGE\"\n roles=$(jq -cn --arg r \"$MENTION\" '[$r]')\n fi\n # flags 4 is Discord's SUPPRESS_EMBEDS: the links stay, but no preview card is drawn under the message.\n body=$(jq -n --arg content \"${content:0:2000}\" --arg username \"$USERNAME\" --argjson roles \"$roles\" \\\n '{content: $content, username: $username, flags: 4, allowed_mentions: {parse: [], roles: $roles}}')\n status=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 15 \\\n -H 'Content-Type: application/json' -d \"$body\" \"$WEBHOOK\" || true)\n case \"${status:-000}\" in\n 2??) echo \"Notification posted.\" ;;\n *)\n if [ \"$STRICT\" = \"true\" ]; then\n echo \"::error::Notification failed (HTTP ${status:-000}).\"\n exit 1\n fi\n echo \"::warning::Notification failed (HTTP ${status:-000}).\"\n ;;\n esac\n env:\n WEBHOOK: ${{ inputs.webhook }}\n MESSAGE: ${{ inputs.message }}\n MENTION: ${{ inputs.mention }}\n USERNAME: ${{ inputs.username }}\n STRICT: ${{ inputs.strict }}\n";
|
|
585
|
-
var action_default$1 = "name: Setup\ndescription: Prepare the environment and install project dependencies.\n\ninputs:\n node-version:\n description: Node.js version\n required: false\n default: \"26.x\"\n\nruns:\n using: composite\n\n steps:\n - uses: theholocron
|
|
569
|
+
var action_default$1 = "name: Setup\ndescription: Prepare the environment and install project dependencies.\n\ninputs:\n node-version:\n description: Node.js version\n required: false\n default: \"26.x\"\n\nruns:\n using: composite\n\n steps:\n - uses: theholocron/holocron/ci/actions/setup-node@ci-v1\n with:\n node-version: ${{ inputs.node-version }}\n\n - uses: theholocron/holocron/ci/actions/install@ci-v1\n\n # Restored before the bootstrap build below so `pnpm build` replays from the cache instead of running cold.\n # The key names the workflow and job: actions/cache never overwrites an existing key, so with one key per commit only\n # the first job to finish saved its .turbo and every other job's entries (type checks, unit tests) were lost.\n - name: Cache Turbo artifacts\n if: ${{ hashFiles('turbo.json') != '' }}\n uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0\n with:\n path: .turbo\n key: turbo-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}-${{ github.sha }}\n restore-keys: |\n turbo-${{ runner.os }}-${{ github.workflow }}-${{ github.job }}-\n turbo-${{ runner.os }}-\n\n # `@theholocron/cli`'s `dist/cli.mjs` doesn't exist yet at this point, so\n # pnpm's workspace bin-linking can't create `node_modules/.bin/holocron`\n # (silent `WARN ... ENOENT`, not a hard failure). Every package whose\n # scripts delegate via `holocron run <task> --` then fails at run time\n # with `holocron: not found` (#698). Same fix the `holocron` composite\n # action already applies for its own direct invocation (see its \"Build\n # the workspace when the CLI resolves to an unbuilt checkout\" step) —\n # mirrored here so it also covers *nested* `holocron run <task> --`\n # calls from inside package.json scripts, which that action's own guard\n # doesn't reach. `pnpm build` (not a scoped `--filter`) so the CLI's own\n # workspace dependencies (e.g. astromech) build\n # in topological order too — a scoped build skips them and fails.\n # No-op in every consumer repo, where the published tarball already\n # ships `dist/`.\n - name: Build the Holocron CLI\n shell: bash\n run: |\n if [ ! -f node_modules/@theholocron/cli/dist/cli.mjs ]; then\n echo \"→ @theholocron/cli dist/ missing — building the workspace from source\" >&2\n pnpm build\n echo \"→ re-linking node_modules/.bin — pnpm skipped it pre-build\" >&2\n pnpm install --frozen-lockfile\n fi\n\n # A Turbo token with no team turns the remote cache off without a word: every task just runs cold. `TURBO_TEAM` is\n # an organization variable that `holocron sync secrets` writes from the 1Password Environment named by\n # `repo.variables.sync` in .holocron/repo.ts. Quiet when there is no token, because then the cache is meant to be off.\n - name: Warn when the Turbo remote cache is off\n if: ${{ hashFiles('turbo.json') != '' }}\n shell: bash\n run: |\n if [ -n \"$TURBO_TOKEN\" ] && [ -z \"$TURBO_TEAM\" ]; then\n echo \"::warning title=Turbo remote cache is off::TURBO_TOKEN is set but TURBO_TEAM is not. Add it to the 1Password Environment behind repo.variables.sync and run holocron sync secrets.\"\n fi\n";
|
|
586
570
|
var action_default = "name: Setup Node\ndescription: Install pnpm and Node.js with pnpm dependency caching.\n\ninputs:\n node-version:\n description: Node.js version\n required: false\n default: \"26.x\"\nruns:\n using: composite\n\n steps:\n - name: Setup pnpm\n if: ${{ hashFiles('pnpm-lock.yaml') != '' }}\n uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1\n\n - name: Setup Node.js\n uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0\n with:\n node-version: ${{ hashFiles('.node-version') != '' && '' || inputs.node-version }}\n node-version-file: ${{ hashFiles('.node-version') != '' && '.node-version' || '' }}\n cache: ${{ hashFiles('pnpm-lock.yaml') != '' && 'pnpm' || '' }}\n # Do NOT add registry-url here. setup-node writes .npmrc with\n # _authToken=${NODE_AUTH_TOKEN} and sets NPM_CONFIG_USERCONFIG to it.\n # pnpm reads that file, fails env-var substitution when the token is\n # empty, and loses auth entirely. Without registry-url, pnpm 10.15+\n # handles Trusted Publishing via its own native OIDC exchange.\n\n - name: Add node_modules/.bin to PATH\n shell: bash\n run: echo \"$GITHUB_WORKSPACE/node_modules/.bin\" >> $GITHUB_PATH\n";
|
|
587
571
|
/** Everything up to and including the `workflows/` folder: `ci/workflows/`, `../workflows/` (how `src/index.ts` globs it) or a templates folder. */
|
|
588
572
|
const SOURCE_ROOT = /^(?:.*\/)?workflows\//;
|
|
@@ -830,97 +814,97 @@ function workflowKeys(name) {
|
|
|
830
814
|
return keys.length > 0 ? keys : [workflowKey(name)];
|
|
831
815
|
}
|
|
832
816
|
// src/templates/workflows/annotate.yml
|
|
833
|
-
var annotate_default = "name: annotate\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\nconcurrency:\n group: review-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n checks: write\n pull-requests: write\n\njobs:\n annotate:\n name: annotate\n uses: theholocron/.github
|
|
817
|
+
var annotate_default = "name: annotate\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\nconcurrency:\n group: review-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n checks: write\n pull-requests: write\n\njobs:\n annotate:\n name: annotate\n uses: theholocron/holocron/.github/workflows/annotate.yml@ci-v1\n secrets: inherit\n";
|
|
834
818
|
// src/templates/workflows/build.yml
|
|
835
|
-
var build_default = "name: build\n\non: # yamllint disable-line rule:truthy\n push:\n branches-ignore:\n - main # delivery.publish builds before publishing\n pull_request:\n branches:\n - main\n\nconcurrency:\n group: delivery.build-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n build:\n name: build\n uses: theholocron/.github
|
|
819
|
+
var build_default = "name: build\n\non: # yamllint disable-line rule:truthy\n push:\n branches-ignore:\n - main # delivery.publish builds before publishing\n pull_request:\n branches:\n - main\n\nconcurrency:\n group: delivery.build-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n build:\n name: build\n uses: theholocron/holocron/.github/workflows/build.yml@ci-v1\n secrets: inherit\n";
|
|
836
820
|
// src/templates/workflows/check-notify.yml
|
|
837
|
-
var check_notify_default = "name: check-notify\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch: {}\n\n# The channels it checks, and why ideas, holonet and dev are left out, are in the reusable\n# workflow this calls (`ci/workflows/check-notify.yml` in theholocron/holocron).\n\npermissions: {}\n\njobs:\n check-notify:\n name: check-notify\n uses: theholocron/.github
|
|
821
|
+
var check_notify_default = "name: check-notify\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch: {}\n\n# The channels it checks, and why ideas, holonet and dev are left out, are in the reusable\n# workflow this calls (`ci/workflows/check-notify.yml` in theholocron/holocron).\n\npermissions: {}\n\njobs:\n check-notify:\n name: check-notify\n uses: theholocron/holocron/.github/workflows/check-notify.yml@ci-v1\n secrets: inherit\n";
|
|
838
822
|
// src/templates/workflows/check-preview.yml
|
|
839
|
-
var check_preview_default = "name: check-preview\n\non: # yamllint disable-line rule:truthy\n deployment_status:\n\npermissions:\n contents: read\n # Must be a superset of what the reusable workflow's own job\n # requests (holocron#1058) -- GitHub hard-fails the whole run at\n # startup, zero jobs dispatched, if the callee asks for more than\n # the caller grants. Needed for the author-trust step's\n # commits/{sha}/pulls lookup.\n pull-requests: read\n\njobs:\n check-preview:\n name: check-preview\n # environment_url is the only field documented to point at the live\n # app — target_url can point at a deployment-details page instead,\n # so there's no safe fallback to it. No environment_url means\n # nothing to check; skip the job entirely rather than hit the wrong\n # page.\n if: >-\n github.event.deployment_status.state == 'success' &&\n (github.event.deployment.environment == 'Preview' || github.event.deployment.environment == 'sentinel-pr-preview') &&\n github.event.deployment_status.environment_url != ''\n uses: theholocron/.github
|
|
823
|
+
var check_preview_default = "name: check-preview\n\non: # yamllint disable-line rule:truthy\n deployment_status:\n\npermissions:\n contents: read\n # Must be a superset of what the reusable workflow's own job\n # requests (holocron#1058) -- GitHub hard-fails the whole run at\n # startup, zero jobs dispatched, if the callee asks for more than\n # the caller grants. Needed for the author-trust step's\n # commits/{sha}/pulls lookup.\n pull-requests: read\n\njobs:\n check-preview:\n name: check-preview\n # environment_url is the only field documented to point at the live\n # app — target_url can point at a deployment-details page instead,\n # so there's no safe fallback to it. No environment_url means\n # nothing to check; skip the job entirely rather than hit the wrong\n # page.\n if: >-\n github.event.deployment_status.state == 'success' &&\n (github.event.deployment.environment == 'Preview' || github.event.deployment.environment == 'sentinel-pr-preview') &&\n github.event.deployment_status.environment_url != ''\n uses: theholocron/holocron/.github/workflows/check-preview.yml@ci-v1\n with:\n preview-url: ${{ github.event.deployment_status.environment_url }}\n # GitHub evaluates which version of this workflow file to run\n # from the default branch for a deployment_status event (unlike\n # push/pull_request) -- without this, the reusable workflow's\n # checkout would default to that same ref instead of the PR's\n # actual deployed commit.\n sha: ${{ github.event.deployment.sha }}\n secrets:\n # Named explicitly, not `secrets: inherit` -- this job needs only\n # these two secrets (holocron#1030/#1032), not every secret this\n # workflow's caller context has access to (e.g.\n # HOLOCRON_DEPLOYMENTS_TOKEN). VERCEL_TOKEN here is read-only use\n # (verifying deployment ownership), never a write/deploy\n # credential.\n VERCEL_TOKEN: ${{ secrets.HOLOCRON_VERCEL_TOKEN || secrets.VERCEL_TOKEN }}\n VERCEL_PROTECTION_BYPASS_SECRET: ${{ secrets.HOLOCRON_VERCEL_PROTECTION_BYPASS_SECRET || secrets.VERCEL_PROTECTION_BYPASS_SECRET }}\n";
|
|
840
824
|
// src/templates/workflows/check-tokens.yml
|
|
841
|
-
var check_tokens_default = "name: check-tokens\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"17 6 * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n check-tokens:\n name: check-tokens\n uses: theholocron/.github
|
|
825
|
+
var check_tokens_default = "name: check-tokens\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"17 6 * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n check-tokens:\n name: check-tokens\n uses: theholocron/holocron/.github/workflows/check-tokens.yml@ci-v1\n secrets: inherit\n";
|
|
842
826
|
// src/templates/workflows/deploy-preview.yml
|
|
843
|
-
var deploy_preview_default = "name: deploy-preview\n\non: # yamllint disable-line rule:truthy\n pull_request:\n # `closed` runs the reusable's cleanup job, which deletes the PR's previews; its deploy and report jobs skip it.\n types: [opened, synchronize, reopened, closed]\n\nconcurrency:\n group: preview-deploy-${{ github.event.pull_request.number }}\n # Not true: a cancelled run could land between Vercel accepting the\n # upload and the report job posting a status, leaving a real preview\n # deployment with no corresponding GitHub check — worse than letting an\n # overlapping run for the same PR simply queue. It also keeps the cleanup on `closed` behind a deploy still running.\n cancel-in-progress: false\n\npermissions:\n contents: read\n deployments: write\n # Must be a superset of what the reusable workflow's own job requests\n # (holocron#1058) -- its new path-relevance check lists the PR's\n # changed files via the API (holocron#1023).\n pull-requests: read\n\njobs:\n deploy-preview:\n name: deploy-preview\n uses: theholocron/.github
|
|
827
|
+
var deploy_preview_default = "name: deploy-preview\n\non: # yamllint disable-line rule:truthy\n pull_request:\n # `closed` runs the reusable's cleanup job, which deletes the PR's previews; its deploy and report jobs skip it.\n types: [opened, synchronize, reopened, closed]\n\nconcurrency:\n group: preview-deploy-${{ github.event.pull_request.number }}\n # Not true: a cancelled run could land between Vercel accepting the\n # upload and the report job posting a status, leaving a real preview\n # deployment with no corresponding GitHub check — worse than letting an\n # overlapping run for the same PR simply queue. It also keeps the cleanup on `closed` behind a deploy still running.\n cancel-in-progress: false\n\npermissions:\n contents: read\n deployments: write\n # Must be a superset of what the reusable workflow's own job requests\n # (holocron#1058) -- its new path-relevance check lists the PR's\n # changed files via the API (holocron#1023).\n pull-requests: read\n\njobs:\n deploy-preview:\n name: deploy-preview\n uses: theholocron/holocron/.github/workflows/deploy-preview.yml@ci-v1\n with:\n cwd: \".\"\n secrets: inherit\n";
|
|
844
828
|
// src/templates/workflows/deploy-sentinel.yml
|
|
845
|
-
var deploy_sentinel_default = "name: deploy-sentinel\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n deploy-sentinel:\n name: deploy-sentinel\n uses: theholocron/.github
|
|
829
|
+
var deploy_sentinel_default = "name: deploy-sentinel\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n deploy-sentinel:\n name: deploy-sentinel\n uses: theholocron/holocron/.github/workflows/deploy-sentinel.yml@ci-v1\n secrets: inherit\n";
|
|
846
830
|
// src/templates/workflows/deploy.yml
|
|
847
|
-
var deploy_default = "name: deploy\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n workflow_dispatch:\n\nconcurrency:\n group: pages\n cancel-in-progress: false\n\npermissions:\n contents: read\n pages: write\n id-token: write\n\njobs:\n deploy:\n name: deploy\n uses: theholocron/.github
|
|
831
|
+
var deploy_default = "name: deploy\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n workflow_dispatch:\n\nconcurrency:\n group: pages\n cancel-in-progress: false\n\npermissions:\n contents: read\n pages: write\n id-token: write\n\njobs:\n deploy:\n name: deploy\n uses: theholocron/holocron/.github/workflows/deploy.yml@ci-v1\n secrets: inherit\n";
|
|
848
832
|
// src/templates/workflows/doctor-tokens.yml
|
|
849
|
-
var doctor_tokens_default = "name: doctor-tokens\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"41 6 * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n doctor-tokens:\n name: doctor-tokens\n uses: theholocron/.github
|
|
833
|
+
var doctor_tokens_default = "name: doctor-tokens\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"41 6 * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n doctor-tokens:\n name: doctor-tokens\n uses: theholocron/holocron/.github/workflows/doctor-tokens.yml@ci-v1\n secrets: inherit\n";
|
|
850
834
|
// src/templates/workflows/greet.yml
|
|
851
|
-
var greet_default = "name: greet\n\non: # yamllint disable-line rule:truthy\n pull_request:\n issues:\n\npermissions:\n issues: write\n pull-requests: write\n\njobs:\n greet:\n name: greet\n uses: theholocron/.github
|
|
835
|
+
var greet_default = "name: greet\n\non: # yamllint disable-line rule:truthy\n pull_request:\n issues:\n\npermissions:\n issues: write\n pull-requests: write\n\njobs:\n greet:\n name: greet\n uses: theholocron/holocron/.github/workflows/greet.yml@ci-v1\n secrets: inherit\n";
|
|
852
836
|
// src/templates/workflows/label.yml
|
|
853
|
-
var label_default = "name: label\n\non: # yamllint disable-line rule:truthy\n pull_request:\n types:\n - opened\n - edited\n\npermissions:\n contents: read\n issues: write\n pull-requests: write\n\njobs:\n label:\n name: label\n uses: theholocron/.github
|
|
837
|
+
var label_default = "name: label\n\non: # yamllint disable-line rule:truthy\n pull_request:\n types:\n - opened\n - edited\n\npermissions:\n contents: read\n issues: write\n pull-requests: write\n\njobs:\n label:\n name: label\n uses: theholocron/holocron/.github/workflows/label.yml@ci-v1\n secrets: inherit\n";
|
|
854
838
|
// src/templates/workflows/lint/code.yml
|
|
855
|
-
var code_default$1 = "name: lint:code\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: source-quality-static-analysis-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n statuses: write\n\njobs:\n lint-code:\n name: lint:code\n uses: theholocron/.github
|
|
839
|
+
var code_default$1 = "name: lint:code\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: source-quality-static-analysis-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n statuses: write\n\njobs:\n lint-code:\n name: lint:code\n uses: theholocron/holocron/.github/workflows/lint-code.yml@ci-v1\n secrets: inherit\n";
|
|
856
840
|
// src/templates/workflows/lint/commits.yml
|
|
857
|
-
var commits_default = "name: lint:commits\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\nconcurrency:\n group: platform-commit-standards-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-commits:\n name: lint:commits\n uses: theholocron/.github
|
|
841
|
+
var commits_default = "name: lint:commits\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\nconcurrency:\n group: platform-commit-standards-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-commits:\n name: lint:commits\n uses: theholocron/holocron/.github/workflows/lint-commits.yml@ci-v1\n secrets: inherit\n";
|
|
858
842
|
// src/templates/workflows/lint/data.yml
|
|
859
|
-
var data_default = "name: lint:data\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: source-quality-structured-data-validation-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-data:\n name: lint:data\n uses: theholocron/.github
|
|
843
|
+
var data_default = "name: lint:data\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: source-quality-structured-data-validation-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-data:\n name: lint:data\n uses: theholocron/holocron/.github/workflows/lint-data.yml@ci-v1\n secrets: inherit\n";
|
|
860
844
|
// src/templates/workflows/lint/editorconfig.yml
|
|
861
|
-
var editorconfig_default$1 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: lint-editorconfig-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n statuses: write\n\njobs:\n lint-editorconfig:\n name: lint:editorconfig\n uses: theholocron/.github
|
|
845
|
+
var editorconfig_default$1 = "name: lint:editorconfig\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: lint-editorconfig-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n statuses: write\n\njobs:\n lint-editorconfig:\n name: lint:editorconfig\n uses: theholocron/holocron/.github/workflows/lint-editorconfig.yml@ci-v1\n secrets: inherit\n";
|
|
862
846
|
// src/templates/workflows/lint/markdown.yml
|
|
863
|
-
var markdown_default = "name: lint:markdown\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: lint-markdown-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-markdown:\n name: lint:markdown\n uses: theholocron/.github
|
|
847
|
+
var markdown_default = "name: lint:markdown\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: lint-markdown-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n lint-markdown:\n name: lint:markdown\n uses: theholocron/holocron/.github/workflows/lint-markdown.yml@ci-v1\n secrets: inherit\n";
|
|
864
848
|
// src/templates/workflows/lint/unused.yml
|
|
865
|
-
var unused_default = "name: lint:unused\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n lint-unused:\n name: lint:unused\n uses: theholocron/.github
|
|
849
|
+
var unused_default = "name: lint:unused\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n lint-unused:\n name: lint:unused\n uses: theholocron/holocron/.github/workflows/lint-unused.yml@ci-v1\n secrets: inherit\n";
|
|
866
850
|
// src/templates/workflows/mark-stale.yml
|
|
867
|
-
var mark_stale_default = "name: mark-stale\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"30 1 * * *\"\n\npermissions:\n contents: write\n issues: write\n pull-requests: write\n\njobs:\n mark-stale:\n name: mark-stale\n uses: theholocron/.github
|
|
851
|
+
var mark_stale_default = "name: mark-stale\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"30 1 * * *\"\n\npermissions:\n contents: write\n issues: write\n pull-requests: write\n\njobs:\n mark-stale:\n name: mark-stale\n uses: theholocron/holocron/.github/workflows/mark-stale.yml@ci-v1\n with:\n exempt-issue-labels: \"in-progress,wip\"\n exempt-all-issue-milestones: true\n exempt-all-issue-projects: true\n exempt-all-pr-projects: true\n secrets: inherit\n";
|
|
868
852
|
// src/templates/workflows/measure/bundle.yml
|
|
869
|
-
var bundle_default = "name: measure:bundle\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n measure-bundle:\n name: measure:bundle\n uses: theholocron/.github
|
|
853
|
+
var bundle_default = "name: measure:bundle\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n measure-bundle:\n name: measure:bundle\n uses: theholocron/holocron/.github/workflows/measure-bundle.yml@ci-v1\n secrets: inherit\n";
|
|
870
854
|
// src/templates/workflows/measure/docs.yml
|
|
871
|
-
var docs_default$1 = "name: measure:docs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n id-token: write\n\njobs:\n measure-docs:\n name: measure:docs\n uses: theholocron/.github
|
|
855
|
+
var docs_default$1 = "name: measure:docs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n id-token: write\n\njobs:\n measure-docs:\n name: measure:docs\n uses: theholocron/holocron/.github/workflows/measure-docs.yml@ci-v1\n secrets: inherit\n";
|
|
872
856
|
// src/templates/workflows/open-incident.yml
|
|
873
|
-
var open_incident_default = "name: open-incident\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n title:\n description: \"The incident's name (at most 255 characters)\"\n type: string\n required: true\n page:\n description: \"The declared status page, when several are declared\"\n type: string\n default: \"\"\n status:\n description: \"The status the opening update carries\"\n type: choice\n options:\n - investigating\n - identified\n - monitoring\n default: investigating\n components:\n description: \"Components to mark, one <name>=<impact> per line (maintenance, degraded, partial or major)\"\n type: string\n default: \"\"\n message:\n description: \"What the opening update says (empty: a line for the status)\"\n type: string\n default: \"\"\n notify:\n description: \"Tell the page's subscribers\"\n type: boolean\n default: true\n\npermissions:\n contents: read\n\njobs:\n open-incident:\n name: open-incident\n uses: theholocron/.github
|
|
857
|
+
var open_incident_default = "name: open-incident\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n title:\n description: \"The incident's name (at most 255 characters)\"\n type: string\n required: true\n page:\n description: \"The declared status page, when several are declared\"\n type: string\n default: \"\"\n status:\n description: \"The status the opening update carries\"\n type: choice\n options:\n - investigating\n - identified\n - monitoring\n default: investigating\n components:\n description: \"Components to mark, one <name>=<impact> per line (maintenance, degraded, partial or major)\"\n type: string\n default: \"\"\n message:\n description: \"What the opening update says (empty: a line for the status)\"\n type: string\n default: \"\"\n notify:\n description: \"Tell the page's subscribers\"\n type: boolean\n default: true\n\npermissions:\n contents: read\n\njobs:\n open-incident:\n name: open-incident\n uses: theholocron/holocron/.github/workflows/open-incident.yml@ci-v1\n with:\n title: ${{ inputs.title }}\n page: ${{ inputs.page }}\n status: ${{ inputs.status }}\n components: ${{ inputs.components }}\n message: ${{ inputs.message }}\n notify: ${{ inputs.notify }}\n secrets: inherit\n";
|
|
874
858
|
// src/templates/workflows/preview-specs.yml
|
|
875
|
-
var preview_specs_default = "name: preview-specs\n\non: # yamllint disable-line rule:truthy\n pull_request:\n types: [opened, synchronize, reopened, closed]\n paths:\n - \".notes/*.spec.md\"\n - \"docs/wiki/specifications/*.spec.md\"\n - \"docs/wiki/decisions/*.md\"\n\npermissions:\n contents: read\n pull-requests: read\n\njobs:\n preview-specs:\n name: preview-specs\n uses: theholocron/.github
|
|
859
|
+
var preview_specs_default = "name: preview-specs\n\non: # yamllint disable-line rule:truthy\n pull_request:\n types: [opened, synchronize, reopened, closed]\n paths:\n - \".notes/*.spec.md\"\n - \"docs/wiki/specifications/*.spec.md\"\n - \"docs/wiki/decisions/*.md\"\n\npermissions:\n contents: read\n pull-requests: read\n\njobs:\n preview-specs:\n name: preview-specs\n uses: theholocron/holocron/.github/workflows/preview-specs.yml@ci-v1\n secrets: inherit\n";
|
|
876
860
|
// src/templates/workflows/preview.yml
|
|
877
|
-
var preview_default = "name: preview\n\non: # yamllint disable-line rule:truthy\n pull_request:\n branches: [main]\n\nconcurrency:\n group: preview-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n deployments: write\n pull-requests: write\n\njobs:\n preview:\n name: preview\n uses: theholocron/.github
|
|
861
|
+
var preview_default = "name: preview\n\non: # yamllint disable-line rule:truthy\n pull_request:\n branches: [main]\n\nconcurrency:\n group: preview-${{ github.event.pull_request.number }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n deployments: write\n pull-requests: write\n\njobs:\n preview:\n name: preview\n uses: theholocron/holocron/.github/workflows/preview.yml@ci-v1\n secrets: inherit\n";
|
|
878
862
|
// src/templates/workflows/publish-wiki.yml
|
|
879
|
-
var publish_wiki_default = "name: publish-wiki\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\nconcurrency:\n group: ${{ github.event_name == 'pull_request' && format('wiki-preview-{0}', github.event.pull_request.number) || 'wiki' }}\n cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\npermissions:\n contents: read\n deployments: write\n\njobs:\n publish-wiki:\n name: publish-wiki\n if: ${{ github.event_name != 'pull_request' }}\n uses: theholocron/.github
|
|
863
|
+
var publish_wiki_default = "name: publish-wiki\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n pull_request:\n branches: [main]\n\nconcurrency:\n group: ${{ github.event_name == 'pull_request' && format('wiki-preview-{0}', github.event.pull_request.number) || 'wiki' }}\n cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\npermissions:\n contents: read\n deployments: write\n\njobs:\n publish-wiki:\n name: publish-wiki\n if: ${{ github.event_name != 'pull_request' }}\n uses: theholocron/holocron/.github/workflows/publish-wiki.yml@ci-v1\n secrets: inherit\n\n publish-wiki-preview:\n name: publish-wiki\n if: ${{ github.event_name == 'pull_request' }}\n uses: theholocron/holocron/.github/workflows/publish-wiki.yml@ci-v1\n with:\n preview: true\n preview-id: pr-${{ github.event.pull_request.number }}\n secrets: inherit\n";
|
|
880
864
|
// src/templates/workflows/reconcile-ci.yml
|
|
881
|
-
var reconcile_ci_default = "name: reconcile-ci\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"*/15 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n reconcile-ci:\n name: reconcile-ci\n uses: theholocron/.github
|
|
865
|
+
var reconcile_ci_default = "name: reconcile-ci\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"*/15 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n reconcile-ci:\n name: reconcile-ci\n uses: theholocron/holocron/.github/workflows/reconcile-ci.yml@ci-v1\n secrets: inherit\n";
|
|
882
866
|
// src/templates/workflows/reconcile-projects.yml
|
|
883
|
-
var reconcile_projects_default = "name: reconcile-projects\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"23 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n reconcile-projects:\n name: reconcile-projects\n uses: theholocron/.github
|
|
867
|
+
var reconcile_projects_default = "name: reconcile-projects\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"23 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n\njobs:\n reconcile-projects:\n name: reconcile-projects\n uses: theholocron/holocron/.github/workflows/reconcile-projects.yml@ci-v1\n secrets: inherit\n";
|
|
884
868
|
// src/templates/workflows/release.yml
|
|
885
|
-
var release_default = "name: release\n\non: # yamllint disable-line rule:truthy\n push:\n branches:\n - main\n - alpha\n workflow_dispatch:\n inputs:\n dry_run:\n description: >\n Dry run — analyze commits and preview the release without git writes\n or publish. Push-triggered runs always run fully; this only applies\n to manual workflow_dispatch triggers.\n required: false\n default: true\n type: boolean\n\npermissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n release:\n name: release\n uses: theholocron/.github
|
|
869
|
+
var release_default = "name: release\n\non: # yamllint disable-line rule:truthy\n push:\n branches:\n - main\n - alpha\n workflow_dispatch:\n inputs:\n dry_run:\n description: >\n Dry run — analyze commits and preview the release without git writes\n or publish. Push-triggered runs always run fully; this only applies\n to manual workflow_dispatch triggers.\n required: false\n default: true\n type: boolean\n\npermissions:\n contents: write\n id-token: write\n issues: write\n pull-requests: write\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: false\n\njobs:\n release:\n name: release\n uses: theholocron/holocron/.github/workflows/release.yml@ci-v1\n with:\n dry-run: ${{ inputs.dry_run == true }}\n secrets: inherit\n";
|
|
886
870
|
// src/templates/workflows/remind-doctor.yml
|
|
887
|
-
var remind_doctor_default = "name: remind-doctor\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"0 14 * * 1\"\n workflow_dispatch: {}\n\npermissions: {}\n\njobs:\n remind-doctor:\n name: remind-doctor\n uses: theholocron/.github
|
|
871
|
+
var remind_doctor_default = "name: remind-doctor\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"0 14 * * 1\"\n workflow_dispatch: {}\n\npermissions: {}\n\njobs:\n remind-doctor:\n name: remind-doctor\n uses: theholocron/holocron/.github/workflows/remind-doctor.yml@ci-v1\n secrets: inherit\n";
|
|
888
872
|
// src/templates/workflows/scan/code.yml
|
|
889
|
-
var code_default = "name: scan:code\n\non: # yamllint disable-line rule:truthy\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n schedule:\n - cron: \"0 0 * * 1\"\n\npermissions:\n actions: read\n contents: read\n security-events: write\n\njobs:\n scan-code:\n name: scan:code\n uses: theholocron/.github
|
|
873
|
+
var code_default = "name: scan:code\n\non: # yamllint disable-line rule:truthy\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n schedule:\n - cron: \"0 0 * * 1\"\n\npermissions:\n actions: read\n contents: read\n security-events: write\n\njobs:\n scan-code:\n name: scan:code\n uses: theholocron/holocron/.github/workflows/scan-code.yml@ci-v1\n secrets: inherit\n";
|
|
890
874
|
// src/templates/workflows/scan/secrets.yml
|
|
891
|
-
var secrets_default = "name: scan:secrets\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: security-secret-detection-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n scan-secrets:\n name: scan:secrets\n uses: theholocron/.github
|
|
875
|
+
var secrets_default = "name: scan:secrets\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: security-secret-detection-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n scan-secrets:\n name: scan:secrets\n uses: theholocron/holocron/.github/workflows/scan-secrets.yml@ci-v1\n secrets: inherit\n";
|
|
892
876
|
// src/templates/workflows/sync-incidents.yml
|
|
893
|
-
var sync_incidents_default = "name: sync-incidents\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"7,17,27,37,47,57 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-incidents:\n name: sync-incidents\n uses: theholocron/.github
|
|
877
|
+
var sync_incidents_default = "name: sync-incidents\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"7,17,27,37,47,57 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-incidents:\n name: sync-incidents\n uses: theholocron/holocron/.github/workflows/sync-incidents.yml@ci-v1\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
|
|
894
878
|
// src/templates/workflows/sync-issues.yml
|
|
895
|
-
var sync_issues_default = "name: sync-issues\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"47 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n issues: write\n\njobs:\n sync-issues:\n name: sync-issues\n uses: theholocron/.github
|
|
879
|
+
var sync_issues_default = "name: sync-issues\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"47 * * * *\"\n workflow_dispatch: {}\n\npermissions:\n contents: read\n issues: write\n\njobs:\n sync-issues:\n name: sync-issues\n uses: theholocron/holocron/.github/workflows/sync-issues.yml@ci-v1\n secrets: inherit\n";
|
|
896
880
|
// src/templates/workflows/sync-prs.yml
|
|
897
|
-
var sync_prs_default = "name: sync-prs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"4,19,34,49 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n\njobs:\n sync-prs:\n name: sync-prs\n uses: theholocron/.github
|
|
881
|
+
var sync_prs_default = "name: sync-prs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"4,19,34,49 * * * *\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be changed; write nothing to Discord\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n pull-requests: read\n checks: read\n statuses: read\n\njobs:\n sync-prs:\n name: sync-prs\n uses: theholocron/holocron/.github/workflows/sync-prs.yml@ci-v1\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
|
|
898
882
|
// src/templates/workflows/sync-repo.yml
|
|
899
|
-
var sync_repo_default = "name: sync-repo\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n paths:\n - holocron.config.ts\n - package.json\n - pnpm-workspace.yaml\n workflow_dispatch:\n inputs:\n steps:\n description: \"Sync steps to run (default: all)\"\n type: string\n required: false\n\nconcurrency:\n group: sync-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n sync-repo:\n name: sync-repo\n uses: theholocron/.github
|
|
883
|
+
var sync_repo_default = "name: sync-repo\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main]\n paths:\n - holocron.config.ts\n - package.json\n - pnpm-workspace.yaml\n workflow_dispatch:\n inputs:\n steps:\n description: \"Sync steps to run (default: all)\"\n type: string\n required: false\n\nconcurrency:\n group: sync-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n sync-repo:\n name: sync-repo\n uses: theholocron/holocron/.github/workflows/sync-repo.yml@ci-v1\n with:\n steps: ${{ inputs.steps }}\n secrets: inherit\n";
|
|
900
884
|
// src/templates/workflows/sync-secrets.yml
|
|
901
|
-
var sync_secrets_default = "name: sync-secrets\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n\npermissions:\n contents: read\n\njobs:\n sync-secrets:\n name: sync-secrets\n uses: theholocron/.github
|
|
885
|
+
var sync_secrets_default = "name: sync-secrets\n\non: # yamllint disable-line rule:truthy\n workflow_dispatch:\n inputs:\n environment:\n description: The layer (local, dev, ci or prod) or the name of the 1Password Environment to sync from.\n required: false\n default: prod\n type: string\n\npermissions:\n contents: read\n\njobs:\n sync-secrets:\n name: sync-secrets\n uses: theholocron/holocron/.github/workflows/sync-secrets.yml@ci-v1\n with:\n environment: ${{ inputs.environment }}\n secrets: inherit\n";
|
|
902
886
|
// src/templates/workflows/sync-specs.yml
|
|
903
|
-
var sync_specs_default = "name: sync-specs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"17 * * * *\"\n push:\n branches: [main, alpha]\n paths:\n - \".notes/*.spec.md\"\n - \"docs/wiki/specifications/*.spec.md\"\n - \"docs/wiki/decisions/*.md\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; make and write nothing\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-specs:\n name: sync-specs\n # The sync opens its pull request against `alpha`, so only a run on `alpha` is wanted: a push to `main` (a release\n # merge) and a manual run on another branch would build a pull request from the wrong tree.\n if: github.ref == 'refs/heads/alpha'\n permissions:\n contents: write\n pull-requests: write\n uses: theholocron/.github
|
|
887
|
+
var sync_specs_default = "name: sync-specs\n\non: # yamllint disable-line rule:truthy\n schedule:\n - cron: \"17 * * * *\"\n push:\n branches: [main, alpha]\n paths:\n - \".notes/*.spec.md\"\n - \"docs/wiki/specifications/*.spec.md\"\n - \"docs/wiki/decisions/*.md\"\n workflow_dispatch:\n inputs:\n dry_run:\n description: \"Only say what would be made or changed; make and write nothing\"\n type: boolean\n default: false\n\npermissions:\n contents: read\n\njobs:\n sync-specs:\n name: sync-specs\n # The sync opens its pull request against `alpha`, so only a run on `alpha` is wanted: a push to `main` (a release\n # merge) and a manual run on another branch would build a pull request from the wrong tree.\n if: github.ref == 'refs/heads/alpha'\n permissions:\n contents: write\n pull-requests: write\n uses: theholocron/holocron/.github/workflows/sync-specs.yml@ci-v1\n with:\n dry-run: ${{ inputs.dry_run || false }}\n secrets: inherit\n";
|
|
904
888
|
// src/templates/workflows/sync-templates.yml
|
|
905
|
-
var sync_templates_default = "name: sync-templates\n\n# Bootstrap note: this `uses:` a reusable workflow that must already exist\n# on theholocron/.github's main branch to resolve at all — a brand-new\n# reusable workflow here needs ONE manual `holocron sync github` run\n# (pushing directly to theholocron/.github) before this thin caller can\n# ever successfully trigger it, since GitHub resolves `uses:` at run time,\n# not at merge time. Same deadlock every reusable workflow added here hits\n# on its first introduction.\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n paths:\n - ci/**\n - cli/astromech/src/templates/**\n - cli/astromech/src/generators/**\n - cli/astromech/src/registry/**\n - cli/cli/src/commands/sync/**\n workflow_dispatch: {}\n\nconcurrency:\n group: sync-templates\n cancel-in-progress: false\n\npermissions:\n contents: read\n\njobs:\n sync-templates:\n name: sync-templates\n # workflow_dispatch can target ANY ref, not only the release branches — without this,\n # anyone able to dispatch this workflow (a broader group than who can\n # push to them) could run it against an arbitrary branch, checking out\n # and building that ref's own code with the sync token present, then\n # publishing that ref's templates to theholocron/.github.\n if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha'\n uses: theholocron/.github
|
|
889
|
+
var sync_templates_default = "name: sync-templates\n\n# Bootstrap note: this `uses:` a reusable workflow that must already exist\n# on theholocron/.github's main branch to resolve at all — a brand-new\n# reusable workflow here needs ONE manual `holocron sync github` run\n# (pushing directly to theholocron/.github) before this thin caller can\n# ever successfully trigger it, since GitHub resolves `uses:` at run time,\n# not at merge time. Same deadlock every reusable workflow added here hits\n# on its first introduction.\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n paths:\n - ci/**\n - cli/astromech/src/templates/**\n - cli/astromech/src/generators/**\n - cli/astromech/src/registry/**\n - cli/cli/src/commands/sync/**\n workflow_dispatch: {}\n\nconcurrency:\n group: sync-templates\n cancel-in-progress: false\n\npermissions:\n contents: read\n\njobs:\n sync-templates:\n name: sync-templates\n # workflow_dispatch can target ANY ref, not only the release branches — without this,\n # anyone able to dispatch this workflow (a broader group than who can\n # push to them) could run it against an arbitrary branch, checking out\n # and building that ref's own code with the sync token present, then\n # publishing that ref's templates to theholocron/.github.\n if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/alpha'\n uses: theholocron/holocron/.github/workflows/sync-templates.yml@ci-v1\n secrets: inherit\n";
|
|
906
890
|
// src/templates/workflows/test/perf.yml
|
|
907
|
-
var perf_default = "name: test:perf\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n test-perf:\n name: test:perf\n uses: theholocron/.github
|
|
891
|
+
var perf_default = "name: test:perf\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n test-perf:\n name: test:perf\n uses: theholocron/holocron/.github/workflows/test-perf.yml@ci-v1\n secrets: inherit\n";
|
|
908
892
|
// src/templates/workflows/test/unit.yml
|
|
909
|
-
var unit_default = "name: test:unit\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: test-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n id-token: write\n statuses: write\n\njobs:\n test-unit:\n name: test:unit\n uses: theholocron/.github
|
|
893
|
+
var unit_default = "name: test:unit\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: test-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n id-token: write\n statuses: write\n\njobs:\n test-unit:\n name: test:unit\n uses: theholocron/holocron/.github/workflows/test-unit.yml@ci-v1\n with:\n run-unit: true\n secrets: inherit\n";
|
|
910
894
|
// src/templates/workflows/test/visual.yml
|
|
911
|
-
var visual_default = "name: test:visual\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n statuses: write\n\njobs:\n test-visual:\n name: test:visual\n uses: theholocron/.github
|
|
895
|
+
var visual_default = "name: test:visual\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n statuses: write\n\njobs:\n test-visual:\n name: test:visual\n uses: theholocron/holocron/.github/workflows/test-visual.yml@ci-v1\n secrets: inherit\n";
|
|
912
896
|
// src/templates/workflows/typecheck.yml
|
|
913
|
-
var typecheck_default = "name: typecheck\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: typecheck-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n typecheck:\n name: typecheck\n uses: theholocron/.github
|
|
897
|
+
var typecheck_default = "name: typecheck\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\nconcurrency:\n group: typecheck-${{ github.ref }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n typecheck:\n name: typecheck\n uses: theholocron/holocron/.github/workflows/typecheck.yml@ci-v1\n secrets: inherit\n";
|
|
914
898
|
// src/templates/workflows/update-deps.yml
|
|
915
|
-
var update_deps_default = "name: update-deps\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n update-deps:\n name: update-deps\n uses: theholocron/.github
|
|
899
|
+
var update_deps_default = "name: update-deps\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: write\n pull-requests: write\n\njobs:\n update-deps:\n name: update-deps\n uses: theholocron/holocron/.github/workflows/update-deps.yml@ci-v1\n secrets: inherit\n";
|
|
916
900
|
// src/templates/workflows/validate/deps.yml
|
|
917
|
-
var deps_default = "name: validate:deps\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-deps:\n name: validate:deps\n uses: theholocron/.github
|
|
901
|
+
var deps_default = "name: validate:deps\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-deps:\n name: validate:deps\n uses: theholocron/holocron/.github/workflows/validate-deps.yml@ci-v1\n secrets: inherit\n";
|
|
918
902
|
// src/templates/workflows/validate/docs.yml
|
|
919
|
-
var docs_default = "name: validate:docs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-docs:\n name: validate:docs\n uses: theholocron/.github
|
|
903
|
+
var docs_default = "name: validate:docs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-docs:\n name: validate:docs\n uses: theholocron/holocron/.github/workflows/validate-docs.yml@ci-v1\n secrets: inherit\n";
|
|
920
904
|
// src/templates/workflows/validate/generated.yml
|
|
921
|
-
var generated_default = "name: validate:generated\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-generated:\n name: validate:generated\n uses: theholocron/.github
|
|
905
|
+
var generated_default = "name: validate:generated\n\non: # yamllint disable-line rule:truthy\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-generated:\n name: validate:generated\n uses: theholocron/holocron/.github/workflows/validate-generated.yml@ci-v1\n secrets: inherit\n";
|
|
922
906
|
// src/templates/workflows/validate/specs.yml
|
|
923
|
-
var specs_default = "name: validate:specs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-specs:\n name: validate:specs\n uses: theholocron/.github
|
|
907
|
+
var specs_default = "name: validate:specs\n\non: # yamllint disable-line rule:truthy\n push:\n branches: [main, alpha]\n pull_request:\n\npermissions:\n contents: read\n\njobs:\n validate-specs:\n name: validate:specs\n uses: theholocron/holocron/.github/workflows/validate-specs.yml@ci-v1\n secrets: inherit\n";
|
|
924
908
|
// src/generators/github-action-thin-callers/grouped-publish/grouped-publish.ts
|
|
925
909
|
/** The reusable's inputs a group may set for itself; everything else is shared by all releases. */
|
|
926
910
|
const GROUP_INPUTS = [
|
|
@@ -1121,7 +1105,7 @@ function groupedPublishCaller(base, groups, shared, ungrouped = false, republish
|
|
|
1121
1105
|
* (`lint/code.yml` is `lint:code`, see `idFromSource`). The workflow `name:`, the job id and the job `name:` of each are
|
|
1122
1106
|
* the id (see `legacyCaller` for the names they had before).
|
|
1123
1107
|
*/
|
|
1124
|
-
const WORKFLOW_TEMPLATES =
|
|
1108
|
+
const WORKFLOW_TEMPLATES = Object.fromEntries(Object.entries(/* @__PURE__ */ Object.assign({
|
|
1125
1109
|
"../../templates/workflows/annotate.yml": annotate_default,
|
|
1126
1110
|
"../../templates/workflows/build.yml": build_default,
|
|
1127
1111
|
"../../templates/workflows/check-notify.yml": check_notify_default,
|
|
@@ -1171,7 +1155,7 @@ const WORKFLOW_TEMPLATES = rehomeAll(Object.fromEntries(Object.entries(/* @__PUR
|
|
|
1171
1155
|
})).map(([path, text]) => {
|
|
1172
1156
|
const id = idFromSource(path);
|
|
1173
1157
|
return [id, withRunName(text, id, workflowTriggers(text))];
|
|
1174
|
-
}))
|
|
1158
|
+
}));
|
|
1175
1159
|
/** The task names that have a thin-caller workflow template. */
|
|
1176
1160
|
const KNOWN_WORKFLOWS = new Set(Object.keys(WORKFLOW_TEMPLATES));
|
|
1177
1161
|
/**
|
|
@@ -1649,7 +1633,7 @@ function readWorkspacePackages(repoRoot) {
|
|
|
1649
1633
|
* The workflows by task id (`test:unit`): a hosting repo writes one as `.github/workflows/<workflowFile(id)>` and
|
|
1650
1634
|
* `theholocron/.github` holds the frozen copy under its old name ({@link legacyFile}).
|
|
1651
1635
|
*/
|
|
1652
|
-
const REUSABLE_WORKFLOWS =
|
|
1636
|
+
const REUSABLE_WORKFLOWS = WORKFLOWS;
|
|
1653
1637
|
/**
|
|
1654
1638
|
* The reusables a repo that hosts them keeps in its own `.github/workflows`, by id: the ones that only run when
|
|
1655
1639
|
* another workflow calls them. A reusable that is also started by an event or by hand (`tag`, `sync-dispatch`)
|
|
@@ -1670,7 +1654,7 @@ function remotePath(id) {
|
|
|
1670
1654
|
return `.github/workflows/${legacyFile(workflowFile(id))}`;
|
|
1671
1655
|
}
|
|
1672
1656
|
/** Composite actions → `.github/actions/<name>/action.yml` (key includes `/action`). */
|
|
1673
|
-
const REUSABLE_ACTIONS =
|
|
1657
|
+
const REUSABLE_ACTIONS = Object.fromEntries(Object.entries(ACTIONS).map(([name, text]) => [`${name}/action`, text]));
|
|
1674
1658
|
/** GitHub starter-workflow metadata → `workflow-templates/<name>.properties.json`. */
|
|
1675
1659
|
const WORKFLOW_TEMPLATE_PROPERTIES = { label: JSON.stringify({
|
|
1676
1660
|
name: "Bookkeeping",
|
|
@@ -4236,4 +4220,4 @@ function createConfig$9() {
|
|
|
4236
4220
|
function createIgnoreConfig() {
|
|
4237
4221
|
return `${workflowHeader()}${_yamlignore_default}`;
|
|
4238
4222
|
}
|
|
4239
|
-
export { AGGREGATE_CHECK, AGGREGATE_CHECK_NAME, AGGREGATE_SHADOW_CHECK_NAME, AGGREGATE_TIMEOUT_MS, CI_ORDER, DCO_CHECK, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS,
|
|
4223
|
+
export { AGGREGATE_CHECK, AGGREGATE_CHECK_NAME, AGGREGATE_SHADOW_CHECK_NAME, AGGREGATE_TIMEOUT_MS, CI_ORDER, DCO_CHECK, DEFAULT_ORG, DOCUMENTATION_FLAG, DOT_GITHUB_REPO, HOLOCRON_REPO, KNOWN_TASKS, KNOWN_WORKFLOWS, LEGACY_NAMES, PNPM_BUILTIN_COMMANDS, PRERELEASE_CHANNEL, RELEASE_BRANCHES, RESERVED_SCRIPT_NAMES, REUSABLE_ACTIONS, REUSABLE_WORKFLOWS, SUITES, TASKS, WORKFLOW_CHECK_CONTEXTS, WORKFLOW_TEMPLATES, WORKFLOW_TEMPLATE_PROPERTIES, aggregateChecks, aggregatePoster, checkPackageScripts, checkReleaseLines, codecovFlagNames, codecovUploads, compareVersions, createAstromech, createConfig as createCommitMsg, createConfig$1 as createDependabot, createConfig$2 as createDevmoji, createConfig$3 as createEditorconfig, createConfig$4 as createEditorconfigChecker, createHeader, createConfig$5 as createLabeler, createConfig$6 as createPreCommit, createConfig$7 as createPrePush, createConfig$8 as createPrepareCommitMsg, createTsconfig, createIgnoreConfig as createYamlignore, createConfig$9 as createYamllint, defaultListDirs, defaultPaths, defaultReadJson, deployOnRelease, deriveDeployPaths, describeTasks, evaluateAggregate, extractPreviewConfig, formatJson, frozenReusablePaths, generateCombinedDeployContent, generateThinCallerContent, hostedReusableWorkflows, idFromSource, isDeprecated, isGeneratedScript, isTask, legacyFile, legacyName, localize, matchNamespace, mergeScripts, normalizeWorkflowWith, packageLocation, planSuites, planTasks, postAggregate, readWorkspacePackages, recordDeploys, requiredChecks, requiredChecksVerdict, resolveTaskName, reusableTemplates, runCi, runGroup, runTask, scriptName, scriptsFor, stampDeprecated, suiteMembers, taskKey, wedgeFix, workflowFile, workflowKey, workflowKeys, workspacePackages };
|