From 1a843d5c729678fd842e873406228ee6677794fd Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Feb 2024 17:26:47 +0100 Subject: [PATCH 1/2] Ensure workflow is triggered on pull request update Ensure `synchronize` event also trigger the workflow, as relying solely on push events failed for pull requests from forked repositories. See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0ac9f0f..36dbd771 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,6 @@ on: branches-ignore: - 'main' pull_request: - types: [ opened, reopened ] workflow_call: jobs: From 02b75a6e24e79c66100d6ba4e634d2166def80db Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Feb 2024 17:27:06 +0100 Subject: [PATCH 2/2] Prevent multiple triggers of the workflow on pull request Push triggers outside of pull requests are omitted intentionally to prevent duplicate workflow runs. Since this repository mainly involves managing service declarations rather than altering software features, running tests on every commit of every branch isn't seen as essential compared to traditional software. --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36dbd771..2ce40c69 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,6 @@ name: Validate declarations on: - push: - branches-ignore: - - 'main' pull_request: workflow_call: