tägitys käyttöön consumer viittauksessa provider tiedostoihin (#13)
CI Main / Check existing artifact (push) Successful in 12s
unit-tests Link to Bats reports
CI Main / Bats tests (push) Successful in 1m44s
acc-tests Link to Cucumber reports
CI Main / Cucumber tests (push) Successful in 1m31s
CI Main / Build & Push Docker (push) Successful in 54s
CI Main / Report Summary (push) Successful in 13s
CI Main / Move provider version tag (push) Successful in 13s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
ci-docker-build-push Docker build & push 0.2.2 OK

Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #13
This commit was merged in pull request #13.
This commit is contained in:
2026-06-16 06:07:40 +03:00
parent 14a411e340
commit ffc0734b65
8 changed files with 208 additions and 8 deletions
+8 -1
View File
@@ -53,9 +53,16 @@ jobs:
report-summary:
name: Report Summary
needs: [load-config, bats, cucumber]
needs: [load-config, build-push]
if: always()
uses: niko/gitea-ci-library/.gitea/workflows/example-report-summary.yml@main
with:
env_json: ${{ needs.load-config.outputs.env_json }}
suites: bats cucumber
tag-maintenance:
name: Move provider version tag
needs: [build-push]
if: success()
uses: niko/gitea-ci-library/.gitea/workflows/tag-maintenance.yml@main
secrets: inherit
+38
View File
@@ -0,0 +1,38 @@
name: Tag Maintenance
on:
workflow_call:
secrets:
GITEA_TOKEN:
required: true
jobs:
move-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read current provider version
id: version
run: echo "TAG=$(cat CURRENT_PROVIDER_VERSION | tr -d '[:space:]')" >> "$GITHUB_OUTPUT"
- name: Move tag to commit
run: |
TAG="${{ steps.version.outputs.TAG }}"
SHA="${{ github.sha }}"
curl -sf -X DELETE \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
"${{ gitea.server_url }}/api/v1/repos/${{ github.repository }}/tags/${TAG}" || true
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
"${{ gitea.server_url }}/api/v1/repos/${{ github.repository }}/tags" \
-d "{\"tag_name\": \"${TAG}\", \"message\": \"Release ${TAG}\", \"target\": \"${SHA}\"}")
if [ "$HTTP_CODE" = "201" ]; then
echo "${TAG} tag moved to ${SHA}"
else
echo "ERROR: failed to move ${TAG} tag (HTTP $HTTP_CODE)" >&2
exit 1
fi