No description
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Cosign v3.0.5 doesn't allow --tlog-upload=false with the default --use-signing-config. Disable signing config to use legacy mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
| .forgejo/workflows | ||
| actions | ||
| tests | ||
| .gitignore | ||
| CLAUDE.md | ||
| README.md | ||
cicd
Reusable CI/CD composite actions for Forgejo Actions.
Actions
shell-tests
Runs shell-based test scripts with optional apt dependencies.
name: Test
on:
push:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: public/cicd/actions/shell-tests@main
with:
test_scripts: |
./tests/test_one.sh
./tests/test_two.sh
dependencies: jq bc
| Input | Required | Default | Description |
|---|---|---|---|
test_scripts |
yes | - | Newline-separated test scripts to run |
dependencies |
no | jq |
Space-separated apt packages to install |
docker-release
Builds and pushes Docker images with semantic-release versioning. Only builds when conventional commits trigger a version bump.
name: Build
on:
push:
branches: [main, master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: public/cicd/actions/docker-release@main
with:
zot_user: ${{ secrets.ZOT_USER }}
zot_token: ${{ secrets.ZOT_TOKEN }}
gitea_token: ${{ github.token }}
| Input | Required | Default | Description |
|---|---|---|---|
zot_user |
yes | - | Registry username |
zot_token |
yes | - | Registry password/token |
gitea_token |
yes | - | Forgejo token (use ${{ github.token }}) |
registry |
no | registry.godmiljaar.nl |
Container registry URL |
platforms |
no | linux/amd64 |
Target platforms (e.g., linux/amd64,linux/arm64) |
context |
no | . |
Docker build context |
Security
Secrets handling
- Never commit secrets - use Forgejo's repository/organization secrets
- Secrets are passed as explicit action inputs, not inherited
- The
gitea_tokenshould always be${{ github.token }}(auto-generated per workflow run)
Required repository secrets
For docker-release:
ZOT_USER- Registry usernameZOT_TOKEN- Registry password or token
Pre-commit recommendations
Consider adding secret scanning to your repos. Tools like gitleaks or detect-secrets can catch accidental commits.
Why composite actions instead of reusable workflows?
Forgejo's workflow_call (reusable workflows) has a bug where runs-on labels aren't passed from called workflows, causing jobs to hang indefinitely. Composite actions work reliably.
Key differences from reusable workflows:
- Caller provides
runs-on(not inherited) - Caller must checkout before using the action
- Secrets passed as explicit inputs (not
secrets: inherit)
Contributing
Uses Conventional Commits:
feat:→ minor version bumpfix:→ patch version bumpfeat!:orBREAKING CHANGE:→ major version bump