feat/pipeline-improvements #3

Merged
ivanch merged 8 commits from feat/pipeline-improvements into main 2026-07-11 21:07:16 +00:00
2 changed files with 3 additions and 19 deletions
Showing only changes of commit f9864072cf - Show all commits

View File

@@ -29,15 +29,7 @@ jobs:
exit 1 exit 1
fi fi
VERSION="${RELEASE_TAG#v}" VERSION="${RELEASE_TAG#v}"
MATCHING_FILES=$(git grep -Il -e '\bv0\.0\.0\b' -e '\b0\.0\.0\b' || true) sed -i -e "s/\"version\": \"0\.0\.0\"/\"version\": \"$VERSION\"/" manifest.json
if [ -n "$MATCHING_FILES" ]; then
while IFS= read -r file; do
sed -i \
-e "s/\\bv0\\.0\\.0\\b/$RELEASE_TAG/g" \
-e "s/\\b0\\.0\\.0\\b/$VERSION/g" \
"$file"
done <<< "$MATCHING_FILES"
fi
- name: Setup required tools - name: Setup required tools
run: sudo apt-get install zip jq curl -y run: sudo apt-get install zip jq curl -y
@@ -148,15 +140,7 @@ jobs:
exit 1 exit 1
fi fi
VERSION="${RELEASE_TAG#v}" VERSION="${RELEASE_TAG#v}"
MATCHING_FILES=$(git grep -Il -e '\bv0\.0\.0\b' -e '\b0\.0\.0\b' || true) sed -i -e "s/\"version\": \"0\.0\.0\"/\"version\": \"$VERSION\"/" manifest.json
if [ -n "$MATCHING_FILES" ]; then
while IFS= read -r file; do
sed -i \
-e "s/\\bv0\\.0\\.0\\b/$RELEASE_TAG/g" \
-e "s/\\b0\\.0\\.0\\b/$VERSION/g" \
"$file"
done <<< "$MATCHING_FILES"
fi
- name: Log in to Container Registry - name: Log in to Container Registry
run: | run: |

View File

@@ -212,7 +212,7 @@ Build, then combine `dist/` + `manifest.json` into a folder and "Load unpacked"
`Dockerfile` builds in Node 22 Alpine (`npm ci` → runs `scripts/prepare_release.sh``npm run build`) and serves `/app/dist` + `manifest.json` via nginx:alpine on port 80. `Dockerfile` builds in Node 22 Alpine (`npm ci` → runs `scripts/prepare_release.sh``npm run build`) and serves `/app/dist` + `manifest.json` via nginx:alpine on port 80.
### CI/CD (Gitea Actions) ### CI/CD (Gitea Actions)
- `release.yaml` validates each `vX.Y.Z` tag and replaces tracked `v0.0.0`/`0.0.0` placeholders in each build checkout before producing the extension archive and production image. - `release.yaml` validates each `vX.Y.Z` tag and stamps the version into `manifest.json` (`"version": "0.0.0"` → the tag) in each build checkout before producing the extension archive and production image.
- **`pull-request.yaml`** — Triggers on pull request open, reopen, and synchronization. It builds and uploads a PR extension archive containing `dist/`, unpacks that archive in a separate Playwright job to generate the three demo screenshots, and uploads both artifacts. For same-repository PRs, it maintains one Gitea PR comment with inline image attachments; fork PRs retain artifacts but skip the comment because their workflow token is read-only. - **`pull-request.yaml`** — Triggers on pull request open, reopen, and synchronization. It builds and uploads a PR extension archive containing `dist/`, unpacks that archive in a separate Playwright job to generate the three demo screenshots, and uploads both artifacts. For same-repository PRs, it maintains one Gitea PR comment with inline image attachments; fork PRs retain artifacts but skip the comment because their workflow token is read-only.
- After `deploy_vision_start` succeeds, `release.yaml` uses Playwright Chromium against the deployed production page and seeds each browser context from `scripts/demoData.json`. It regenerates `home.png`, `editing.png`, and `configuration.png` at exactly 1280×800, uploads them as artifacts, and attaches them as individual Gitea release assets. - After `deploy_vision_start` succeeds, `release.yaml` uses Playwright Chromium against the deployed production page and seeds each browser context from `scripts/demoData.json`. It regenerates `home.png`, `editing.png`, and `configuration.png` at exactly 1280×800, uploads them as artifacts, and attaches them as individual Gitea release assets.
- **`main.yaml`** — Triggers on push to `main` (and `workflow_dispatch`). Builds, pushes a `staging` multi-arch (amd64/arm64) image to `git.ivanch.me/ivanch/vision-start:staging`, then SSH-deploys on the staging host via `docker compose up -d --force-recreate`. - **`main.yaml`** — Triggers on push to `main` (and `workflow_dispatch`). Builds, pushes a `staging` multi-arch (amd64/arm64) image to `git.ivanch.me/ivanch/vision-start:staging`, then SSH-deploys on the staging host via `docker compose up -d --force-recreate`.