Files
xiaoxia-saas/.gitea/workflows/playwright-base-image.yml
T
xiaoxia bad022610a
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 3m12s
AI Code Review / AI Code Review (pull_request) Successful in 4m17s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m31s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 5m13s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 1m12s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m43s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 5m59s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 6m46s
CI/CD Pipeline / Validate - Style (pull_request) Successful in 7m0s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 7m9s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 7m7s
CI/CD Pipeline / Validate - Security (pull_request) Successful in 11m42s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 21m31s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 333h44m13s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 333h44m15s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 333h44m14s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 333h44m15s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 333h44m15s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 333h54m20s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 333h54m22s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 333h54m24s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 333h59m52s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 334h1m39s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 334h1m43s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 334h2m32s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 334h5m46s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 334h5m50s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 334h5m50s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 334h5m50s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 334h5m53s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 334h18m34s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 334h36m1s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 334h40m8s
ci: add playwright base image build workflow
2026-09-02 17:18:59 +08:00

60 lines
1.7 KiB
YAML

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"