- An organization (in this example:
game-devstudio) - Two repositories:
game-devstudio/.github— an organization repository that stores settings and reusable workflowsgame-devstudio/ghas-guardrail-demo— a sample Node.js application that will call the reusable workflow
1) Create the reusable workflow
Add a workflow file to the.github repository at game-devstudio/.github/.github/workflows/reusable-ci.yml:
on: workflow_callexposes this workflow so other workflows can call it.- Declares a required input
node-versionso callers can choose the Node.js version. - The
npm-installjob checks out the code, configures Node.js to the requested version, and runsnpm installon an Ubuntu runner.
main branch of game-devstudio/.github.
Reusable workflows are invoked using the
uses: <owner>/<repo>/<path>@<ref> syntax. Any inputs declared under workflow_call must be supplied by the caller. See the GitHub Docs for reusing workflows: https://docs.github.com/actions/learn-github-actions/reusing-workflows2) Call the reusable workflow from another repo
In the application repository (game-devstudio/ghas-guardrail-demo) create a workflow at game-devstudio/ghas-guardrail-demo/.github/workflows/ci.yml that references the reusable workflow:
- The
usesvalue includes:- owner:
game-devstudio - repository:
.github - path:
.github/workflows/reusable-ci.yml - ref:
@main
- owner:
workflow_dispatchenables manual runs from the Actions UI for testing.
main in game-devstudio/ghas-guardrail-demo. The caller workflow will run on push or can be triggered manually via the Actions tab.

3) Troubleshooting: “workflow was not found”
If the run fails with an error like this:- Open the repository that contains the reusable workflow (
game-devstudio/.github). - Go to Settings → Actions → General.
- Under the access control options, allow the appropriate repositories to call workflows from this repository — for example choose “Accessible from repositories in this organization” if you want organization repositories to call it.
- Save changes and re-run the caller workflow (push or use
workflow_dispatch).

If the reusable-workflow repository is private, only repositories with explicit access (or those allowed by organization settings) can call it. Check both the Actions access control and repository visibility before retrying.
4) Repository visibility considerations
If access is still blocked, verify the visibility and access of the calling repository. In this demo, the caller needed to be private to match the access policy. To change visibility (if necessary), go to the calling repo’s Settings → Danger Zone and follow the prompts to make the repository private. Be sure to review the consequences before changing visibility.
workflow_dispatch).
5) Successful run — what to expect
When the caller has permission, the run will expand to show the jobs and steps defined in the reusable workflow. You will see the job name (npm-install) and each step execute on the runner. Example log snippets:
Summary — key points
- Create reusable workflows with
on: workflow_calland declare any inputs (for examplenode-version). - Call them from other repositories with
uses: <owner>/<repo>/<path>@<ref>and supply requiredwithinputs. - Ensure the repository containing the reusable workflow allows access for the caller via Settings → Actions → General.
- Repository visibility matters: a private reusable-workflow repo requires appropriate access settings for callers.
- Reusing workflows (GitHub Docs): https://docs.github.com/actions/learn-github-actions/reusing-workflows
- Actions settings and permissions: https://docs.github.com/actions/learn-github-actions/permissions-for-workflows
- Workflow syntax for GitHub Actions: https://docs.github.com/actions/learn-github-actions/workflow-syntax-for-github-actions