Files
gitea-ci-library/.gitea/workflows/ci-engine.yml
T
moilanik f4baa286c7
ci-report POC report published
CI / call-engine (push) Successful in 15s
fix: correct git-pages host URL and publish script BASE return
2026-06-12 07:54:52 +03:00

48 lines
1.5 KiB
YAML

name: CI Engine
on:
workflow_call:
jobs:
poc-report:
runs-on: ubuntu-latest
env:
GITEA_API_URL: https://gitea.app.keskikuja.site
PAGES_HOST: ci-reports.helm-dev.keskikuja.site
GIT_PAGES_PUBLISH_URL: https://ci-reports.helm-dev.keskikuja.site
GIT_PAGES_PUBLISH_TOKEN: ${{ secrets.GIT_PAGES_PUBLISH_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Generate POC report
run: |
SHA8="${GITHUB_SHA:0:8}"
mkdir -p "reports/${SHA8}"
cat > "reports/${SHA8}/index.html" <<EOF
<!DOCTYPE html>
<html lang="fi">
<head><meta charset="utf-8"><title>POC report ${SHA8}</title></head>
<body>
<h1>git-pages POC</h1>
<p>Commit: ${GITHUB_SHA}</p>
<p>Branch: ${GITHUB_REF_NAME}</p>
<p>Run: ${GITHUB_RUN_ID}</p>
</body>
</html>
EOF
- name: Publish report to git-pages
id: publish
run: |
REPORT_BASE=$(bash scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}")
echo "report_url=${REPORT_BASE}/index.html" >> "${GITHUB_OUTPUT}"
echo "Published: ${REPORT_BASE}/index.html"
- name: Set commit status with report link
run: |
bash scripts/report-status.sh \
success \
"POC report published" \
"${{ steps.publish.outputs.report_url }}" \
"ci-report"