From ef159837d189ca863b5c98fb2f206759017f2dc7 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 25 Mar 2024 21:43:35 -0400 Subject: [PATCH 1/4] update ci push trigger only to some branches, ignore examples, .md --- .github/workflows/ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01c82f8196..a16debdef9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,18 @@ name: ci on: -- pull_request -- push + push: + branches: + - master + - '4.x' + - '5.x' + paths-ignore: + - 'examples/**' + - '*.md' + pull_request: + paths-ignore: + - 'examples/**' + - '*.md' jobs: test: From 3da4d4d0635359b3a74ab039e2d873a1393267ee Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 25 Mar 2024 22:12:28 -0400 Subject: [PATCH 2/4] crib fastify's ci concurrency logic https://github.com/fastify/fastify/blob/76674fdf46e4da5f1c18e0c86f615c4b538282cd/.github/workflows/ci.yml#L18 --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a16debdef9..7fc216da6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,12 @@ on: - 'examples/**' - '*.md' +# Cancel in progress workflows +# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run +concurrency: + group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest From 8ced30f06cb6be6a86303a352cf2f068c3b83de9 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 25 Mar 2024 22:29:05 -0400 Subject: [PATCH 3/4] add develop to branches --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fc216da6c..81e4823373 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - develop - '4.x' - '5.x' paths-ignore: From 641c880e8120be6637631316e8562cf978212616 Mon Sep 17 00:00:00 2001 From: Jon Church Date: Mon, 25 Mar 2024 22:45:13 -0400 Subject: [PATCH 4/4] remove examples from the ignore --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81e4823373..f43deeb538 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,9 @@ on: - '4.x' - '5.x' paths-ignore: - - 'examples/**' - '*.md' pull_request: paths-ignore: - - 'examples/**' - '*.md' # Cancel in progress workflows