From e1a5cccc3c3374007f51b5a8f57c808326e192f2 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 6 Nov 2020 17:02:47 +0100 Subject: [PATCH 1/2] Run GHA CI only on push or pull request, but not both --- .github/workflows/aarch64.yml | 10 +++++++++- .github/workflows/linux.yml | 10 +++++++++- .github/workflows/macos.yml | 10 +++++++++- .github/workflows/win.yml | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.github/workflows/aarch64.yml b/.github/workflows/aarch64.yml index 491afbcbd10a..c9a7f6c22a62 100644 --- a/.github/workflows/aarch64.yml +++ b/.github/workflows/aarch64.yml @@ -1,6 +1,14 @@ name: AArch64 CI -on: [push, pull_request] +on: + push: + pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - "**:**" jobs: musl-build: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2d36da97594c..47bb217a246d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,6 +1,14 @@ name: Linux CI -on: [push, pull_request] +on: + push: + pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - "**:**" env: TRAVIS_OS_NAME: linux diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0f10ac993bc4..5d7f05037f6e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,6 +1,14 @@ name: macOS CI -on: [push, pull_request] +on: + push: + pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - "**:**" env: SPEC_SPLIT_DOTS: 160 diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index a2841f017b55..4d29ade1b5a4 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -1,6 +1,14 @@ name: Windows CI -on: [push, pull_request] +on: + push: + pull_request: + branches: + # Branches from forks have the form 'user:branch-name' so we only run + # this job on pull_request events for branches that look like fork + # branches. Without this we would end up running this job twice for non + # forked PRs, once for the push and then once for opening the PR. + - "**:**" jobs: linux-job: From 0e2e32eb962d58976dfb0994d3fd9ea1486d8b04 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Mon, 23 Nov 2020 13:12:35 +0100 Subject: [PATCH 2/2] Revert to the previous version --- .github/workflows/aarch64.yml | 8 +++----- .github/workflows/linux.yml | 8 +++----- .github/workflows/macos.yml | 8 +++----- .github/workflows/win.yml | 8 +++----- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/aarch64.yml b/.github/workflows/aarch64.yml index c9a7f6c22a62..8e99d970c275 100644 --- a/.github/workflows/aarch64.yml +++ b/.github/workflows/aarch64.yml @@ -2,13 +2,11 @@ name: AArch64 CI on: push: + branches: + - master pull_request: branches: - # Branches from forks have the form 'user:branch-name' so we only run - # this job on pull_request events for branches that look like fork - # branches. Without this we would end up running this job twice for non - # forked PRs, once for the push and then once for opening the PR. - - "**:**" + - master jobs: musl-build: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 47bb217a246d..e676c7c42db7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,13 +2,11 @@ name: Linux CI on: push: + branches: + - master pull_request: branches: - # Branches from forks have the form 'user:branch-name' so we only run - # this job on pull_request events for branches that look like fork - # branches. Without this we would end up running this job twice for non - # forked PRs, once for the push and then once for opening the PR. - - "**:**" + - master env: TRAVIS_OS_NAME: linux diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5d7f05037f6e..1542007ac42b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,13 +2,11 @@ name: macOS CI on: push: + branches: + - master pull_request: branches: - # Branches from forks have the form 'user:branch-name' so we only run - # this job on pull_request events for branches that look like fork - # branches. Without this we would end up running this job twice for non - # forked PRs, once for the push and then once for opening the PR. - - "**:**" + - master env: SPEC_SPLIT_DOTS: 160 diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 4d29ade1b5a4..e35a64bd2e27 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -2,13 +2,11 @@ name: Windows CI on: push: + branches: + - master pull_request: branches: - # Branches from forks have the form 'user:branch-name' so we only run - # this job on pull_request events for branches that look like fork - # branches. Without this we would end up running this job twice for non - # forked PRs, once for the push and then once for opening the PR. - - "**:**" + - master jobs: linux-job: