refactor(ci): composite actions instead of reusable workflows (Forgejo 11)
All checks were successful
CI / preflight (push) Successful in 5s
CI / typecheck (push) Successful in 15s
ecosystem-selftest / semantic-release-bumptest (push) Successful in 13s
ecosystem-selftest / eslint-gate (push) Successful in 3s
ecosystem-selftest / yamllint-gate (push) Successful in 3s
pulumi-preview / preview (push) Successful in 16s
All checks were successful
CI / preflight (push) Successful in 5s
CI / typecheck (push) Successful in 15s
ecosystem-selftest / semantic-release-bumptest (push) Successful in 13s
ecosystem-selftest / eslint-gate (push) Successful in 3s
ecosystem-selftest / yamllint-gate (push) Successful in 3s
pulumi-preview / preview (push) Successful in 16s
Forgejo 11.0.15 does NOT support reusable workflows (job-level `uses:` / `workflow_call`): the call is silently dropped and no run is scheduled (verified live — a same-repo and a cross-repo reusable call both produced zero runs, while an equivalent inline job ran green). The working cross-repo reuse primitive here is the COMPOSITE ACTION referenced by FULL URL (a short-form `uses: olsitec/foundation/...@master` resolves against the runner's DEFAULT_ACTIONS_URL = data.forgejo.org, not the local instance, and 404s; the full-URL form `uses: https://forge.olsitec.net/olsitec/foundation/actions/<x>@master` was verified green). - Replace the four reusable-*.yml with composite actions under actions/: node-build, docker-build, lint, semantic-release-version (same logic + inputs). - actions/README.md documents the pattern, the Forgejo-11 limitation, and the 999_testing candidate coverage (C2/C3/C4 self-contained; C1/C5 blocked on the not-yet-published @olsitec package registry). - ecosystem-selftest paths filter: actions/** (was reusable-*.yml). The capabilities that need no external repo (semantic-release bump sequence, eslint/yamllint gates) keep running green via ecosystem-selftest's inline jobs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
67157a0de0
commit
35dc008759
12 changed files with 335 additions and 277 deletions
|
|
@ -1,63 +0,0 @@
|
|||
# reusable-lint — eslint + yamllint gate (999_testing "linter testing").
|
||||
#
|
||||
# A REUSABLE workflow (on: workflow_call). Either linter finding an error makes
|
||||
# the job exit non-zero (the acceptance criterion). Prefers the project's own
|
||||
# pinned eslint (node_modules/.bin) for config/plugin fidelity, falling back to
|
||||
# the foundation-ci image's global eslint; yamllint comes from the image.
|
||||
#
|
||||
# jobs:
|
||||
# lint:
|
||||
# uses: olsitec/foundation/.forgejo/workflows/reusable-lint.yml@master
|
||||
# with: { eslint-paths: ".", yamllint-paths: "." }
|
||||
name: reusable-lint
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
eslint:
|
||||
type: boolean
|
||||
default: true
|
||||
yamllint:
|
||||
type: boolean
|
||||
default: true
|
||||
eslint-paths:
|
||||
type: string
|
||||
default: "."
|
||||
yamllint-paths:
|
||||
type: string
|
||||
default: "."
|
||||
package-manager:
|
||||
description: "bun | npm | none — to install project-local eslint config/plugins"
|
||||
type: string
|
||||
default: bun
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: foundation-ci:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies (project-local eslint config/plugins)
|
||||
if: ${{ inputs.eslint }}
|
||||
run: |
|
||||
case "${{ inputs.package-manager }}" in
|
||||
bun) bun install --frozen-lockfile || bun install || true ;;
|
||||
npm) npm ci || npm install || true ;;
|
||||
none) echo "skip install" ;;
|
||||
esac
|
||||
|
||||
- name: eslint
|
||||
if: ${{ inputs.eslint }}
|
||||
run: |
|
||||
if [ -x node_modules/.bin/eslint ]; then
|
||||
echo "+ project eslint"; node_modules/.bin/eslint ${{ inputs.eslint-paths }}
|
||||
else
|
||||
echo "+ image eslint"; eslint ${{ inputs.eslint-paths }}
|
||||
fi
|
||||
|
||||
- name: yamllint
|
||||
if: ${{ inputs.yamllint }}
|
||||
run: |
|
||||
echo "+ yamllint ${{ inputs.yamllint-paths }}"
|
||||
yamllint ${{ inputs.yamllint-paths }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue