actions-reusable-workflows
Wire a repository to the bitwise-media-group/github-workflows reusable workflows — thin, SHA-pinned caller workflows for CI, security (CodeQL) scanning, release (release-please/GoReleaser/Zensical doc
SKILL.mdplugins/actions/skills/actions-reusable-workflows/SKILL.md
GitHubWire the bitwise reusable workflows
The org centralises CI, security scanning, release, Renovate, and the fast-forward /merge automation in
bitwise-media-group/github-workflows. A consuming repo keeps
a thin caller in .github/workflows/ that owns its triggers, grants a permission ceiling, and delegates the work
with uses:. The library's examples/ directory holds a fully-commented caller for every workflow — copy those from
the release you pin; never write callers from memory, because inputs, secrets, and permission sets change between
majors.
The workflows run the repo's mise tasks with every toolchain installed from its mise pins, so a repo needs the shared
toolchain first — see the workflow-toolchain skill. Author bespoke workflows with actions-style, harden them with
actions-security, and run actions-validate before committing.
1. Resolve the latest release and its commit
url=https://github.com/bitwise-media-group/github-workflows.git
tag=$(git ls-remote --tags --refs --sort=-v:refname "$url" 'v*.*.*' | head -n1 | sed 's|.*refs/tags/||')
src=$(mktemp -d "${TMPDIR:-/tmp}/github-workflows.XXXXXX")
git clone --quiet --depth 1 --branch "$tag" "$url" "$src"
sha=$(git -C "$src" rev-parse HEAD) # the commit every caller pins
Read $src/README.md before choosing callers: its catalog lists each workflow's inputs, secrets, outputs, the
permission ceiling the caller must grant, and the consumer contract (mise tasks, CodeQL detection, release files). It is
authoritative for that tag; this skill is not.
2. Copy and pin the callers
Copy each caller from $src/examples/<workflow>.yaml to .github/workflows/<workflow>.yaml, then pin it. The examples
carry an all-zeros placeholder SHA, the release in a comment, and a marker for the library's own release automation:
uses: bitwise-media-group/github-workflows/.github/workflows/ci.yaml@<40 zeros> # vX.Y.Z # x-release-please-version
Replace the zeros with $sha, keep the # vX.Y.Z comment, and drop the # x-release-please-version marker:
for f in .github/workflows/*.yaml; do
sed -i.bak "s|@0\{40\} # \(v[0-9.]*\) # x-release-please-version|@$sha # \1|" "$f" && rm -- "$f.bak"
done
grep -rn '@0\{40\}' .github/workflows && echo 'unpinned caller left' >&2
Pin the full SHA, never a floating tag (@v8) or @main — see the actions-security skill for why a mutable ref on a
privileged workflow matters. Renovate's github-actions manager bumps the SHA and its comment together from then on. To
update callers to a newer release, repeat §1 and re-diff each caller against its new example — a major release can add
required permissions or rename inputs. Keep the examples' # zizmor: ignore[...] comments on the
pull_request_target / workflow_run triggers; they record why those triggers are safe there.
3. Choose the callers
| Caller | Wire it when | Notes |
|---|---|---|
ci.yaml |
always | Runs lint / build / test (opt-in e2e); skips undefined tasks; fails with no mise config. |
security.yaml |
always | CodeQL: actions always, go / javascript-typescript by detection. Bundled dist/ → codeql-config. |
release.yaml |
the repo cuts releases | release-please, then GoReleaser if .goreleaser.yaml, Zensical → Pages if zensical.toml. |
merge.yaml |
always, with merge-review-ack |
/merge + /auto-merge fast-forward; needs the FF Merge App and a review-required ruleset. |
merge-review-ack.yaml |
always, with merge |
Carries approvals into merge.yaml via workflow_run; the only check the merge system adds. |
merge-notice.yaml |
always | One-time "this repo merges via /merge" comment on new PRs. |
renovate.yaml |
always | Per-repo Renovate run on the org bot's App, config, and preset. |
add-to-project.yaml |
only outside the org settings sync | github-settings' org-config.sh workflows-sync fans it out to every org repo. |
codeql-config.yaml is not a caller: copy it to .github/codeql/codeql-config.yaml and pass it as security.yaml's
config-file input when the repo commits a dist/ bundle.
4. Edits every adopter must check
- Permissions — grant exactly the example's
permissions:block. Forrelease.yamlkeep every scope even without a.goreleaser.yamlorzensical.toml: GitHub unions a reusable workflow's job permissions and ignoresif:, so a missing scope fails the run at startup. workflow_runnames must match —merge.yaml'sworkflow_run.workflowslists workflows by theirname:, and the examples disagree (ci.yamlis namedContinuous Integration,merge.yamllists"CI"). List the repo's real CI caller name(s) plus"Merge Review Ack", or auto-merge never fires.release.yamlinputs —vanity-tags: trueis for Actions/reusable repos pinned@v1; drop it for binaries. Setapp-client-id+app-private-key(the FF Merge App) to auto-merge release PRs or publish a Homebrew cask. Themacos-*secrets apply only to a.goreleaser.yamlwith anotarize.macosblock.- Release files —
release-please-config.json+.release-please-manifest.jsonare required;.goreleaser.yamlandzensical.toml(+pyproject.toml,uv.lock, Pages source GitHub Actions) opt into those paths. - Mix freely — a caller may add product-specific jobs (an
integrationjob) beside the reusable-workflow job.
5. Org setup and Renovate
The App-backed callers (merge, release optionally, add-to-project, renovate) take input app-client-id from an
org variable and secret app-private-key from an org secret; a new repo only needs each App installed. Dependency
updates come from the per-repo renovate.yaml caller — never add Dependabot. The variable and secret names, setup
pointers, and the Renovate override file are in reference.md.