Просмотр исходного кода

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

Optimize CI workflow to avoid duplicate runs
Wei Wang 7 месяцев назад
Родитель
Сommit
eb175c4a14
2 измененных файлов с 12 добавлено и 2 удалено
  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:
   run:
     shell: bash -leo pipefail {0}
     shell: bash -leo pipefail {0}
 
 
-on: [push, pull_request]
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    types: [opened, synchronize, reopened]
 
 
 concurrency:
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
   group: ${{ github.workflow }}-${{ github.ref }}

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

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