refactor: split ci.yml into branch-specific orchestrators, extract version check
- ci.yml: pure dispatch (Feature → ci-feature, Main → ci-main), 18 lines - ci-feature.yml (new): load-config → quality-gate - ci-main.yml (new): load-config → check-version → quality-gate → docker-build-push - check-version.yml (new): provider workflow for artifact existence check and version calculation - docker-build-push.yml (renamed from build_publish-artifact.yml): - removed check job, quality-gate block, gatekeeper logic, build-context artifact - version passed as input, simplified needs chain (build → push → tag-commit) - fixed consumer→provider checkout pattern (.ci/scripts/)
This commit is contained in:
+8
-24
@@ -5,30 +5,14 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
load-config:
|
||||
name: Load gitea-env.conf to pipeline env
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@main
|
||||
with:
|
||||
config_path: .gitea/workflows/gitea-env.conf
|
||||
|
||||
# feature:
|
||||
# name: Quality Gate
|
||||
# if: github.ref != 'refs/heads/main'
|
||||
# needs: [load-config]
|
||||
# uses: niko/gitea-ci-library/.gitea/workflows/quality-gate.yml@main
|
||||
# secrets: inherit
|
||||
# with:
|
||||
# env_json: ${{ needs.load-config.outputs.env_json }}
|
||||
# bats-image: bats/bats:latest
|
||||
# cucumber-node-image: node:22
|
||||
feature:
|
||||
name: Feature
|
||||
if: github.ref != 'refs/heads/main'
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/ci-feature.yml@feature/docker-kuntoon
|
||||
secrets: inherit
|
||||
|
||||
main:
|
||||
name: Build & Push Artifact
|
||||
# if: github.ref == 'refs/heads/main' # FIXME: väliaikainen — ajetaan tässä haarassa
|
||||
needs: [load-config]
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/build_publish-artifact.yml@feature/docker-kuntoon
|
||||
name: Main
|
||||
if: github.ref == 'refs/heads/main'
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/ci-main.yml@feature/docker-kuntoon
|
||||
secrets: inherit
|
||||
with:
|
||||
env_json: ${{ needs.load-config.outputs.env_json }}
|
||||
bats-image: bats/bats:latest
|
||||
cucumber-node-image: node:22
|
||||
|
||||
Reference in New Issue
Block a user