From 499efc03af85cb257ac700951caae0c497b7b736 Mon Sep 17 00:00:00 2001 From: Chris Yeninas <844685+PhantomGamers@users.noreply.github.com> Date: Sat, 27 Nov 2021 19:31:26 -0500 Subject: [PATCH] build.yaml: better duplicate build avoidance uses https://github.com/marketplace/actions/skip-duplicate-actions to avoid duplicate builds --- .github/workflows/build.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 027192c6..3b756d72 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,8 +7,19 @@ on: workflow_dispatch: jobs: + pre_job: + runs-on: ubuntu-latest + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + paths_ignore: '["**/README.md"]' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' build: - if: (github.event_name == 'pull_request' && github.event.pull_request.merged != 'true') || github.event_name == 'push' + needs: pre_job + if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: windows-latest steps: