Files
TJWaterFrontend_Refine/memery.md
T
jiang 3afe885cc0
Build Push and Deploy / docker-image (push) Failing after 2s
Build Push and Deploy / deploy-fallback-log (push) Successful in 2s
ci: harden gitea package workflow
Make checkout idempotent for reused runner workspaces and add a safe test-tag path that validates builds without pushing images or calling the deploy webhook.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 15:31:01 +08:00

1.4 KiB

CI build notes

2026-04-24

  • Observed failure while reproducing workflow checkout locally: the Checkout code step ran git remote add origin ... unconditionally. In a workspace that already had an origin remote, the job failed with error: remote origin already exists. and exited before docker build.
  • Why this matters for act_runner: self-hosted Gitea runners can reuse working directories or start from repositories that already contain Git metadata, so checkout logic must be idempotent.
  • Applied fix: changed .gitea/workflows/package.yml to initialize Git only when needed, use git remote set-url origin ... when origin already exists, and force-clean the workspace after checking out FETCH_HEAD.
  • Safety improvement for remote validation: tags ending with -test now run the build verification path only. They skip registry login, image push, latest updates, and the deploy webhook so act_runner can be tested without deployment side effects.
  • Current local result: npm run lint, npm run test -- --runInBand, npm run build, docker build ..., and npm run build inside gitea/runner-images:ubuntu-22.04 all completed successfully after the workflow adjustment.
  • Non-blocking note: local Jest run reported a haste-map naming collision between package.json and .next/standalone/package.json; tests still passed, and this does not affect the current image-build workflow.