Mono repository of reusable GitHub Actions used across techcode.io workflows.
- A GitHub repository using GitHub Actions workflows.
- One directory per action, versioned and released independently.
- Each action is tested by its own workflow, only when it changes.
- Per-action tags: an immutable
<action>/vX.Y.Zand a floating<action>/vX. - Proxies for third-party actions, pinned to a commit SHA and forwarding all inputs and outputs unchanged.
- Dependabot keeps the workflows and every action up to date.
- We needed a single place to share the actions used across our repositories.
- Each action should be testable and releasable on its own, without versioning the whole repository.
- Third-party actions are pinned and reviewed in one place, instead of in every consuming repository.
The following steps will ensure your project is cloned properly.
- Clone repository:
git clone https://github.com/techcode-io/github-actions cd github-actions
- Each action has a dedicated workflow named
.github/workflows/test-<action>.yml. - It runs on pull requests and pushes to
mainwhen files under<action>/**change.
- Create
<action>/action.ymland<action>/README.md. - Add
.github/workflows/test-<action>.yml(copy an existing one). It must trigger onworkflow_calland on changes under<action>/**. - Add a
test-<action>job and its clause in thepublishcondition of.github/workflows/release.yml. - Add the action to the table below.
For a proxy of a third-party action, the composite action.yml copies the upstream inputs (with their defaults) and outputs, and pins the upstream action to a commit SHA with the version in a comment:
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0Any input selecting a tool or image version defaults to a pinned release instead of latest, so a given action version always installs the same thing. Dependabot does not update these defaults: bump them by hand.
- Dependabot (
.github/dependabot.yml) checks the workflows and every action directory weekly. - New action directories are covered automatically.
- Each pull request updates a single directory: once an action's update is merged, release a new version of that action.
- Run the Release action workflow with the action directory and a
X.Y.Zversion. - It runs the action's test workflow, then pushes the tag
<action>/vX.Y.Z, moves the floating<action>/vXtag and creates a GitHub release.
Each action is referenced by its prefixed tag:
- uses: techcode-io/github-actions/<action>@<action>/v1| Action | Description |
|---|---|
| create-pull-request | Proxy for peter-evans/create-pull-request |
| setup-buildx | Proxy for docker/setup-buildx-action |
| setup-github-bot | Configure git to commit as github-actions[bot] |
| setup-qemu | Proxy for docker/setup-qemu-action |
| setup-uv | Proxy for astral-sh/setup-uv |
If you find this project useful here's how you can help, please click the 👁️ Watch button to avoid missing notifications about new versions, and give it a 🌟 GitHub Star!
You can also contribute by:
- Sending a Pull Request with your awesome new features and bug fixed.
- Be part of the community and help resolve Issues.
The github-actions project is free and open-source software licensed under the Apache-2.0 license.