Files
bookmarkmagic/.github/workflows/codeql.yml
T
poli0981andClaude Opus 5 7884d7c14d ci: add the four caller workflows
Per docs/12 §2, with every input checked against the ops repo's actual
workflow_call blocks rather than the doc — docs/12 originally described a
template family that had never existed.

Verified before writing: reusable-chrome-extension.yml takes
package-manager/node-version/build-command/source-dir/release and declares NO
secrets block, so passing a named secret to it would be a compile error;
reusable-codeql.yml takes `languages` as a JSON-array string (the older
codeql.yml's singular `language` is the wrong one); notify-ci-failure.yml
declares DISCORD_CI_WEBHOOK required:true; announce-release.yml's secrets are
optional. actions/checkout@v7 and setup-node@v6 are what the ops repo itself
runs.

Three traps the comments now carry, because each costs a run to rediscover:
- leaving package-manager at its 'none' default skips install and build, then
  fails on `test -f ./manifest.json`, a file WXT never writes to the repo root;
- reusable workflows do not inherit the caller's permissions, so every caller
  repeats its permissions block on the job;
- the release announcement is a job INSIDE release.yml, not an
  `on: release: [published]` caller — a Release created by gh under the default
  GITHUB_TOKEN emits no event that starts new workflow runs, so the
  event-driven version silently never fires.

The quality job is local because the reusable runs no quality gates at all.
All four parse, and `npm run zip` emits .output/bookmarkmagic-0.1.0-chrome.zip,
matching the glob release.yml uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 14:09:45 +07:00

37 lines
991 B
YAML

# Caller stub — docs/12 §2.2.
#
# Uses `reusable-codeql.yml` (CodeQL Action v4), NOT the older `codeql.yml`,
# whose input is the singular `language`. This one takes `languages`: a JSON
# array encoded as a string.
#
# ⚠️ Prerequisite: repo Settings → Advanced Security → CodeQL "Default setup"
# must be DISABLED, or this advanced-setup workflow is rejected at SARIF upload.
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 14 * * 1' # weekly, Monday
permissions:
security-events: write
actions: read
contents: read
packages: read
jobs:
analyze:
# Reusable workflows do not inherit the caller's permissions — the block
# below is repeated on the job on purpose.
uses: poli0981/.github/.github/workflows/reusable-codeql.yml@main
permissions:
security-events: write
actions: read
contents: read
packages: read
with:
languages: '["javascript-typescript"]'