refaktorointia
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 12s
ci-bats Bats tests OK
CI Feature / Bats tests (push) Successful in 1m41s
ci-cucumber Cucumber tests OK
CI Feature / Cucumber tests (push) Successful in 1m3s
CI Feature / Report Summary (push) Successful in 4s
CI Feature / Validate CI config (push) Failing after 16s

This commit is contained in:
moilanik
2026-06-15 16:38:27 +03:00
parent 41b1119f21
commit c19f0b79ec
8 changed files with 53 additions and 108 deletions
-24
View File
@@ -15,7 +15,6 @@ on:
value: ${{ jobs.check.outputs.version }}
env:
GITEA_API_URL: ${{ fromJson(inputs.env_json).GITEA_API_URL }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
jobs:
@@ -26,15 +25,6 @@ jobs:
version: ${{ steps.set-outputs.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: niko/gitea-ci-library
path: .ci
- name: Set Gitea status to PENDING
run: |
echo "===== gitea-ci-library - Check existing artifact | begin ====="
bash .ci/scripts/report-status.sh pending "Checking version..." ci-check
- name: Check existing artifact and calculate version
run: |
@@ -72,17 +62,3 @@ jobs:
source /tmp/build-ctx/build.env
echo "artifact_exists=$ARTIFACT_EXISTS" >> "$GITHUB_OUTPUT"
echo "version=$NEXT_VERSION" >> "$GITHUB_OUTPUT"
- name: Set Gitea status to SUCCESS
if: success()
run: |
source /tmp/build-ctx/build.env
if [ "${ARTIFACT_EXISTS}" = "true" ]; then
bash .ci/scripts/report-status.sh success "Skip build: version $NEXT_VERSION exists" ci-check
else
bash .ci/scripts/report-status.sh success "Build version $NEXT_VERSION required" ci-check
fi
- name: Set Gitea status to FAILURE
if: failure()
run: bash .ci/scripts/report-status.sh failure "Check version FAILED" ci-check
-12
View File
@@ -26,17 +26,5 @@ jobs:
repository: niko/gitea-ci-library
path: .ci
- name: Pending
run: bash .ci/scripts/report-status.sh pending "Validating CI config..." ci-validate
- name: Validate CI config
id: validate
run: bash .ci/scripts/ci-validate.sh
- name: Report status SUCCESS
if: success()
run: bash .ci/scripts/report-status.sh success "CI config valid" ci-validate
- name: Report status FAILURE
if: failure()
run: bash .ci/scripts/report-status.sh failure "CI validation FAILED" ci-validate
-17
View File
@@ -85,15 +85,6 @@ jobs:
needs: [build-push]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: niko/gitea-ci-library
path: .ci
- name: Set Gitea status to PENDING
run: |
echo "===== gitea-ci-library - Create Tag | begin ====="
bash .ci/scripts/report-status.sh pending "Creating tag..." ci-docker-tag
- name: Create git tag
env:
@@ -113,11 +104,3 @@ jobs:
else
exit 1
fi
- name: Report status SUCCESS
if: success()
run: bash .ci/scripts/report-status.sh success "Tag ${VERSION} OK" ci-docker-tag
- name: Report status FAILURE
if: failure()
run: bash .ci/scripts/report-status.sh failure "Tag ${VERSION} FAILED" ci-docker-tag
+3 -2
View File
@@ -7,10 +7,10 @@ on:
jobs:
load-config:
name: Load gitea-env.conf to pipeline env
name: Load example-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
config_path: .gitea/workflows/example-gitea-env.conf
validate:
name: Validate CI config
@@ -45,3 +45,4 @@ jobs:
uses: niko/gitea-ci-library/.gitea/workflows/example-report-summary.yml@feature/docker-kuntoon
with:
env_json: ${{ needs.load-config.outputs.env_json }}
suites: bats cucumber
+3 -2
View File
@@ -7,10 +7,10 @@ on:
jobs:
load-config:
name: Load gitea-env.conf to pipeline env
name: Load example-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
config_path: .gitea/workflows/example-gitea-env.conf
check-version:
name: Check existing artifact
@@ -56,6 +56,7 @@ jobs:
uses: niko/gitea-ci-library/.gitea/workflows/example-report-summary.yml@feature/docker-kuntoon
with:
env_json: ${{ needs.load-config.outputs.env_json }}
suites: bats cucumber
build-push:
name: Build & Push Docker
+7 -2
View File
@@ -5,6 +5,10 @@ on:
env_json:
required: true
type: string
suites:
required: true
type: string
description: Space-separated suite names published to git-pages
env:
GIT_PAGES_URL: ${{ fromJson(inputs.env_json).GIT_PAGES_URL }}
@@ -24,6 +28,7 @@ jobs:
echo ""
echo "| Suite | Report |"
echo "|-------|--------|"
echo "| Bats (unit) | [View report](${BASE}/bats/) |"
echo "| Cucumber | [View report](${BASE}/cucumber/) |"
for suite in ${{ inputs.suites }}; do
echo "| ${suite} | [View report](${BASE}/${suite}/) |"
done
} >> "${GITHUB_STEP_SUMMARY}"