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.md

GitHub

Wire 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. For release.yaml keep every scope even without a .goreleaser.yaml or zensical.toml: GitHub unions a reusable workflow's job permissions and ignores if:, so a missing scope fails the run at startup.
  • workflow_run names must match — merge.yaml's workflow_run.workflows lists workflows by their name:, and the examples disagree (ci.yaml is named Continuous Integration, merge.yaml lists "CI"). List the repo's real CI caller name(s) plus "Merge Review Ack", or auto-merge never fires.
  • release.yaml inputs — vanity-tags: true is for Actions/reusable repos pinned @v1; drop it for binaries. Set app-client-id + app-private-key (the FF Merge App) to auto-merge release PRs or publish a Homebrew cask. The macos-* secrets apply only to a .goreleaser.yaml with a notarize.macos block.
  • Release files — release-please-config.json + .release-please-manifest.json are required; .goreleaser.yaml and zensical.toml (+ pyproject.toml, uv.lock, Pages source GitHub Actions) opt into those paths.
  • Mix freely — a caller may add product-specific jobs (an integration job) 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.