From 5e776fc458edf67d2a27d37dd2edeb41829e5fa6 Mon Sep 17 00:00:00 2001 From: Andreas Linde <42185+DerAndereAndi@users.noreply.github.com> Date: Wed, 19 Jan 2022 12:44:15 +0100 Subject: [PATCH] Prevent building twice when pushing to a PR (#2345) Created PRs and commit pushes to PRs are all already handled by `pull_request`. Having `push` without limitations causes 2 build runs on every PR commit push. Also the `push` scenario is only required for pushes (direct or merges) to the master branch. --- .github/workflows/default.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 4ff6e799f..80ce222b7 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -1,6 +1,11 @@ name: Default -on: [push, pull_request, workflow_call] +on: + push: + branches: + - master + pull_request: + workflow_call: jobs: