From 9b633181ff1a5513a48fa5657565830d5a806cd4 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 27 Sep 2024 10:43:47 -0400 Subject: [PATCH 1/2] chore: avoid running Actions twice on PR Refs: https://github.com/orgs/community/discussions/57827#discussioncomment-6579237 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed08f4b7f..4328adf50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,8 @@ name: CI on: [push, pull_request] jobs: test: + # Avoid running CI more than once on pushes to main repo open PRs + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest services: postgres: From cfb5f32ac542cc401a8fb1e26a093e048f5e1599 Mon Sep 17 00:00:00 2001 From: Mike Fiedler Date: Fri, 27 Sep 2024 10:49:40 -0400 Subject: [PATCH 2/2] chore: run once --- .github/workflows/static.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3207b964e..d29c620ee 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -1,7 +1,9 @@ name: Check collectstatic on: [push, pull_request] jobs: - test: + collectstatic: + # Avoid running CI more than once on pushes to main repo open PRs + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest steps: - name: Check out repository