Reusable workflows and example workflows to copy-paste.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martijn van der Kleijn 2369cd3ac2
ci: only suggest updates to go version if version < latest minor-1
Signed-off-by: Martijn van der Kleijn <martijn@opencommit.eu>
2026-09-23 17:09:40 +02:00
.forgejo/workflows fix: add missing nodejs to REUSE workflow 2026-09-18 17:39:39 +02:00
examples fix: add missing nodejs to REUSE workflow 2026-09-18 17:39:39 +02:00
LICENSES initial commit 2026-09-18 01:17:47 +02:00
README.md feat: add go-ci workflow 2026-09-18 17:31:44 +02:00
renovate.json ci: only suggest updates to go version if version < latest minor-1 2026-09-23 17:09:40 +02:00

Workflows

Single source of truth for reusable Actions workflow definitions and their copy-paste equivalents. Every workflow in this repository is the blueprint; the reusable workflows are shared by reference and the examples are self-contained copies for projects that prefer no cross-repository coupling.

All content is published under CC0-1.0 so it can be copied into any project without attribution headaches.

Repository layout

workflows/
├── .forgejo/
│   └── workflows/
│       ├── go-ci.yml          # CI for Go projects (on: workflow_call)
│       ├── hello-ci.yml       # Minimal reusable workflow (on: workflow_call)
│       └── reuse.yml          # REUSE compliance check workflow
├── examples/
│   ├── go-ci.yml              # Copy-in standalone equivalent
│   ├── hello-ci.yml           # Copy-in standalone equivalent
│   └── reuse.yml              # Copy-in standalone equivalent
├── LICENSES/
│   └── CC0-1.0.txt            # License text for blueprint code
└── README.md

Reusable workflows

on: workflow_call workflows in .forgejo/workflows/ are invoked by reference. Call them from another repository on OpenCommit by pinning the repository and tag:

name: ci

on:
  push:
    paths-ignore:
      - '**/*.md'
  pull_request:
    paths-ignore:
      - '**/*.md'

concurrency:
  group: ${{ forgejo.workflow }}-${{ forgejo.ref }}
  cancel-in-progress: true

jobs:
  smoke:
    uses: blueprints/workflows/.forgejo/workflows/hello-ci.yml@v1

Do not set runs-on on a job that uses a reusable workflow. Omitting it lets Forgejo expand the callee jobs into the UI and run them on their own runners with their own runs-on values.

Workflow Purpose
go-ci.yml CI for Go projects — build, vet, and test with the Go toolchain.
hello-ci.yml Fast, low-overhead smoke test confirming the runner is available and basic execution works.
reuse.yml Runs reuse lint against the repository using the fsfe/reuse container image.

Copy-paste examples

examples/ holds the standalone equivalents: same jobs and steps, but triggered by push, pull_request and workflow_dispatch instead of workflow_call. Copy the file you need into your project's .forgejo/workflows/ directory, adjust, and commit. For example, go-ci.yml gives you build, vet, and test for a Go project in a single file.

Example workflow conventions

All example workflows in this organisation follows these conventions:

  • Concurrency — every PR-triggered workflow declares a concurrency group with cancel-in-progress: true so a new push supersedes the running run for the same PR.
  • Markdown-only changes — push and pull_request triggers use paths-ignore: ['**/*.md'] so documentation-only commits skip the pipeline.
  • Caching — toolchain jobs cache via the mirrored actions/setup-* and actions/cache actions (pinned by SHA). Jobs without a language stack, such as the container-based REUSE check, do not need a cache step.

NOTE — the reuseable REUSE compliance check lives in its own workflow file with no language stack, so any repository can adopt it without adding a toolchain.

Versioning

This repository follows Semantic Versioning on the repository tags:

  • v1.0.0 — initial release. Callers pin to the floating major tag, e.g. @v1.
  • Patch (v1.0.1) — backwards-compatible bug fixes in steps or image tags.
  • Minor (v1.1.0) — backwards-compatible additions, such as new optional inputs or steps.
  • Major (v2.0.0) — breaking changes to inputs, secrets, job names, or required steps.

Conventions we use:

  • We create vX.Y.Z tags for every release and move the vX tag to the newest release so callers pinning @vX (recommended) receive fixes while remaining on the same major.
  • We never change the contents of an existing vX.Y.Z tag. If a release is broken, we release a new patch/minor/major instead.

REUSE compliance

This repository is REUSE compliant. All files carry SPDX headers. The reusable workflows and examples keep their SPDX headers so the license information travels along when they are copied into other projects.

You can verify locally with:

reuse lint