A reusable workflow with many inputs is harder to read than a copy, and gives little in return. The complete pipeline is now in forgejo/template-go, which a team copies and changes. This repository keeps only actions with real logic: checkout and ko-build. BREAKING CHANGE: .forgejo/workflows/go.yml is gone. Copy .forgejo/workflows/ci.yml of forgejo/template-go. |
||
|---|---|---|
| checkout | ||
| docs | ||
| ko-build | ||
| .editorconfig | ||
| README.md | ||
forgejo/ci-components
Actions for Forgejo Actions on code.digitaledienst.overheid.nl. Each action does one step that
has logic which you do not want to copy into each repository.
A complete pipeline is not here: it is in an example repository, which you copy and change. For
Go, that is forgejo/template-go.
Use an existing action (for example from data.forgejo.org) before you add one here.
Status: draft. The requirements and their status are in
docs/requirements.md. The first user is the template
forgejo/template-go. Issue:
#1486.
Contents
| Action | What it does |
|---|---|
ko-build |
Builds a Go image with ko and pushes it for a tag or the default branch; builds without a push for each other ref. Runs in the ko image, without root. Output: image-ref. |
checkout |
Checks out the commit of the run with git. Needs no node, so it works in each language image on the label default. |
Use an action
- uses: https://code.digitaledienst.overheid.nl/forgejo/ci-components/checkout@main
Use the full URL: the short form looks on data.forgejo.org. See
template-go/.forgejo/workflows/ci.yml
for both actions in a pipeline.
The draft uses @main. A release gets a tag vX.Y.Z and a moving tag vX. Refer to vX after
the first release.