Skip to content

About

Mono repository of reusable GitHub Actions used across techcode.io workflows

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

GitHub Actions

Mono repository of reusable GitHub Actions used across techcode.io workflows.

📦 Prerequisites

  • A GitHub repository using GitHub Actions workflows.

✨ Features

  • 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.Z and 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.

🎯 Motivation

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

🔨 Workflow

Setup

The following steps will ensure your project is cloned properly.

  1. Clone repository:
    git clone https://github.com/techcode-io/github-actions
    cd github-actions

Test

  • Each action has a dedicated workflow named .github/workflows/test-<action>.yml.
  • It runs on pull requests and pushes to main when files under <action>/** change.

Add an action

  1. Create <action>/action.yml and <action>/README.md.
  2. Add .github/workflows/test-<action>.yml (copy an existing one). It must trigger on workflow_call and on changes under <action>/**.
  3. Add a test-<action> job and its clause in the publish condition of .github/workflows/release.yml.
  4. 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.0

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

Update dependencies

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

Release

  • Run the Release action workflow with the action directory and a X.Y.Z version.
  • It runs the action's test workflow, then pushes the tag <action>/vX.Y.Z, moves the floating <action>/vX tag and creates a GitHub release.

📖 Usage

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

❤️ Contributing

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.

🧾 License

The github-actions project is free and open-source software licensed under the Apache-2.0 license.

About

Mono repository of reusable GitHub Actions used across techcode.io workflows

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors