0f2a8a2a8c
CI / call-engine (push) Failing after 2m26s
- ci-engine.yml: 2 dummy test stepiä + agnostinen publish-stage (skannaa .meta-tiedostot, PATCH raportit, postaa status + linkki) - publish-git-pages.sh: palauta BASE URL (ilman index.html) - .meta-formaatti: lisää context, description, state kentät
48 lines
1.4 KiB
YAML
48 lines
1.4 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: pages.helm-dev.keskikuja.site
|
|
GIT_PAGES_PUBLISH_URL: https://pages.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_URL=$(bash scripts/publish-git-pages.sh "reports/${GITHUB_SHA:0:8}")
|
|
echo "report_url=${REPORT_URL}" >> "${GITHUB_OUTPUT}"
|
|
echo "Published: ${REPORT_URL}"
|
|
|
|
- name: Set commit status with report link
|
|
run: |
|
|
bash scripts/report-status.sh \
|
|
success \
|
|
"POC report published" \
|
|
"${{ steps.publish.outputs.report_url }}" \
|
|
"ci-report"
|