Răsfoiți Sursa

Merge pull request #2402 from onevcat/optimize-ci-workflow

Optimize CI workflow to avoid duplicate runs
Wei Wang 7 luni în urmă
părinte
comite
eb175c4a14
2 a modificat fișierele cu 12 adăugiri și 2 ștergeri
  1. 6 1
      .github/workflows/build.yaml
  2. 6 1
      .github/workflows/test.yaml

+ 6 - 1
.github/workflows/build.yaml

@@ -4,7 +4,12 @@ defaults:
   run:
     shell: bash -leo pipefail {0}
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    types: [opened, synchronize, reopened]
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}

+ 6 - 1
.github/workflows/test.yaml

@@ -4,7 +4,12 @@ defaults:
   run:
     shell: bash -leo pipefail {0}
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    types: [opened, synchronize, reopened]
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}