Created a GitHub Reusable Workflows Repository for Personal Use
Source: Dev.to
Overview
GitHub Actions’ reusable workflows let you call workflow files from other repositories.
Example usage:
jobs:
example:
uses: masutaka/actions/.github/workflows/some-workflow.yml@main
Consolidating common processes in a single repository reduces the overhead of maintaining duplicate workflow files across multiple projects.
Limitations & Caveats
- Private → Public: Reusable workflows in private repositories cannot be called from public repositories.
- Same Org/User: Private reusable workflows can only be called from other repositories belonging to the same user or organization. The called repository’s Access policy must be configured accordingly.
- Environment Context: The
envcontext defined at the calling workflow level is not propagated to the called workflow. - Secrets: Only regular secrets can be passed via
secrets: inherit; environment secrets cannot be forwarded. - Job‑Level Execution: Reusable workflows always run at the job level (they cannot be used as steps). Each call starts a separate runner, so the filesystem is not shared between jobs. For private repositories this also increases Actions minutes consumption. To reuse at the step level, create a composite action instead.
Since masutaka/actions is a public repository, the first two limitations do not apply.
Repository Contents
The repository currently includes the following reusable workflows (each documented in docs/ and linked from README.md):
| Workflow | Description |
|---|---|
add_assignee_to_pr.yml | Sets the PR creator as the assignee when a PR is opened |
codeql.yml | Detects languages from changed files and runs CodeQL analysis |
codeql_core.yml | Runs CodeQL analysis for specified languages |
create_gh_issue.yml | Creates a GitHub Issue from a template |
dependency_review.yml | Reviews PR dependencies |
pushover.yml | Sends Pushover notifications for workflow failures |
Origin & Customization
Previously I used the route06/actions repository (where I was a maintainer at a former job). For personal use I wanted a few customizations, especially a new pushover.yml workflow, so I copied the necessary files into a new repository: masutaka/actions.
Before this consolidation, the same pushover.yml file was duplicated across several personal repositories. Moving everything into a single repository now allows updates to be made in one place.
Licensing & Attribution
Both the original and the new repositories are released under the MIT License. For each copied workflow file I added attribution at the top, e.g.:
# Derived from https://github.com/route06/actions/blob/main/.github/workflows/codeql.yml
# Copyright (c) 2024 ROUTE06, Inc.
# Licensed under the MIT License.
The LICENSE file contains both copyright notices:
Copyright (c) Takashi Masuda
Copyright (c) 2024 ROUTE06, Inc.
This satisfies the attribution requirements of the MIT License.
Future Plans
As my personal repositories continue to grow, I intend to keep adding and refining shareable workflows in masutaka/actions, further reducing duplication and maintenance effort.