From 42a2fda6ebb5290ab0f10813018cb30fe1340cc4 Mon Sep 17 00:00:00 2001 From: adilallo <39313955+adilallo@users.noreply.github.com> Date: Fri, 29 Aug 2025 21:38:01 -0600 Subject: [PATCH] Fix duplicate workflow runs: Use Option A - run CI once for PRs, only push to protected branches --- .gitea/workflows/ci.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 2a4265b..2f7af07 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -4,9 +4,10 @@ run-name: ${{ gitea.actor }} triggered CI pipeline on: workflow_dispatch: {} push: - branches: [main, develop, "fix-runner-trigger"] + branches: [main, develop] # only direct pushes/merges to protected branches pull_request: - branches: [main, develop] + branches: [main, develop] # PRs into main/develop + types: [opened, reopened, synchronize] jobs: canary: @@ -92,9 +93,9 @@ jobs: env: { CI: true } - run: npx wait-on http://localhost:3000 - # Seed snapshots on main branch only (one-time setup) - - name: Seed snapshots (main only) - if: github.ref == 'refs/heads/main' + # Seed snapshots on main branch only (one-time setup) + - name: Seed snapshots (main only) + if: gitea.ref == 'refs/heads/main' run: PLAYWRIGHT_UPDATE_SNAPSHOTS=1 npx playwright test tests/e2e/visual-regression.spec.ts --project=chromium env: { CI: true }