diff --git a/.github/workflows/local_unit_test.yml b/.github/workflows/local_unit_test.yml index ac7657da5..e82f04cec 100644 --- a/.github/workflows/local_unit_test.yml +++ b/.github/workflows/local_unit_test.yml @@ -5,8 +5,23 @@ on: pull_request: jobs: + #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. + check-for-duplicates: + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + skip_after_successful_duplicate: 'true' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' Local-Unit-Test: + needs: check-for-duplicates + if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} runs-on: ubuntu-18.04 timeout-minutes: 15