Merge pull request 'ci: 添加 Playwright 基础镜像构建工作流' (#1631) from fix/playwright-base-image into develop
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (push) Successful in 7s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 3m36s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m38s
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m11s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 56s
CI/CD Pipeline / Validate - Style (push) Successful in 4m42s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 4m5s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m13s
AI Code Review / AI Code Review (pull_request) Failing after 7m9s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m31s
CI/CD Pipeline / Integration Tests (push) Successful in 5m11s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m36s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m25s
CI/CD Pipeline / CI Gate (pull_request) Successful in 3s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m50s
CI/CD Pipeline / Validate - Security (push) Successful in 9m10s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 3m23s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 10m45s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m55s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 5m28s
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 333h53m25s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 333h53m27s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 333h53m29s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 333h53m27s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 333h53m29s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 333h53m31s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 333h53m32s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 333h53m36s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 333h53m34s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 333h53m38s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 333h53m40s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 333h54m14s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 333h54m16s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 333h54m26s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 333h54m18s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 333h54m30s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 333h55m5s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 333h55m7s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 333h55m11s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Failing after 333h56m57s
CI/CD Pipeline / Frontend Lint (push) Failing after 333h58m3s
CI/CD Pipeline / Validate - Security (pull_request) Failing after 333h56m59s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 333h59m45s
CI/CD Pipeline / Validate - Style (pull_request) Failing after 333h57m1s
CI/CD Pipeline / PR Build Web Image (push) Failing after 333h59m48s
CI/CD Pipeline / PR Build API Image (push) Failing after 333h59m50s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 334h0m39s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 334h0m49s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 334h0m58s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 334h27m47s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 334h27m51s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 334h28m48s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 334h29m29s

ci: add playwright base image build workflow
This commit was merged in pull request #1631.
This commit is contained in:
2026-09-02 17:19:29 +08:00
@@ -0,0 +1,59 @@
name: Playwright Base Image Build
on:
workflow_dispatch:
inputs:
reason:
description: "触发原因"
required: false
default: "构建 playwright 基础镜像"
jobs:
build-playwright:
name: Build Playwright Base Image
runs-on: runtime-builder
timeout-minutes: 30
steps:
- name: Docker login to Gitea Registry
shell: sh
env:
GITEA_REGISTRY_USER: xiaoxia
GITEA_REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
set -eu
for i in 1 2 3; do
echo "=== Docker login attempt $i/3 ==="
if printf '%s' "${GITEA_REGISTRY_TOKEN}" | docker login git.xiaoxiajianji.com -u "${GITEA_REGISTRY_USER}" --password-stdin; then
echo "Docker login successful"
break
fi
echo "Docker login failed (attempt $i/3), retrying in 5s..."
sleep 5
[ $i -eq 3 ] && exit 1
done
- name: Pull, retag and push Playwright image
shell: sh
run: |
set -eu
OFFICIAL_IMAGE="mcr.microsoft.com/playwright:v1.45.0-jammy"
GITEA_IMAGE="git.xiaoxiajianji.com/xiaoxia/base/playwright:v1.45.0-jammy"
echo "=== Pulling official Playwright image ==="
docker pull "${OFFICIAL_IMAGE}"
echo "=== Tagging ==="
docker tag "${OFFICIAL_IMAGE}" "${GITEA_IMAGE}"
echo "=== Pushing to Gitea Registry ==="
docker push "${GITEA_IMAGE}"
echo "Done: ${GITEA_IMAGE}"
- name: Cleanup
if: always()
shell: sh
run: |
docker rmi "mcr.microsoft.com/playwright:v1.45.0-jammy" 2>/dev/null || true
docker rmi "git.xiaoxiajianji.com/xiaoxia/base/playwright:v1.45.0-jammy" 2>/dev/null || true
echo "Cleanup done"