- 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
This commit is contained in:
@@ -3,10 +3,45 @@ on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
hello:
|
||||
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: Provider engine reachable
|
||||
run: echo "ci-engine (provider) running via uses binding"
|
||||
- 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"
|
||||
|
||||
@@ -7,3 +7,4 @@ on:
|
||||
jobs:
|
||||
call-engine:
|
||||
uses: niko/gitea-ci-library/.gitea/workflows/ci-engine.yml@plan/0003-alkaa-käyttämään-itseään-commit-raportti
|
||||
secrets: inherit
|
||||
|
||||
Reference in New Issue
Block a user