فهرست منبع

enhance: prevent deploy when e2e failed

Tienson Qin 4 ماه پیش
والد
کامیت
d77ce05934
2فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 8 0
      .github/workflows/clj-e2e.yml
  2. 13 0
      .github/workflows/deploy-db-test-pages.yml

+ 8 - 0
.github/workflows/clj-e2e.yml

@@ -92,3 +92,11 @@ jobs:
           name: e2e-screenshots
           path: clj-e2e/e2e-dump/*
           retention-days: 1
+
+      - name: Mark success
+        if: ${{ success() }}
+        run: echo "E2E OK" > e2e-success.txt
+        uses: actions/upload-artifact@v4
+        with:
+          name: e2e-success
+          path: e2e-success.txt

+ 13 - 0
.github/workflows/deploy-db-test-pages.yml

@@ -14,6 +14,19 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
+      - uses: actions/download-artifact@v4
+        with:
+          name: e2e-success
+          path: .
+        continue-on-error: true
+
+      - name: Check E2E success
+        run: |
+          if [ ! -f e2e-success.txt ]; then
+            echo "❌ E2E tests did not succeed — aborting release."
+            exit 1
+          fi
+
       - uses: actions/checkout@v4
 
       - name: Setup Java JDK