Skip to content

Commit

Permalink
Prevent duplicate workflow runs when pushing pull requests
Browse files Browse the repository at this point in the history
Use the fkirc/skip-duplicate-actions GitHub action to prevent duplicate
workflow runs.
  • Loading branch information
sophokles73 committed Oct 7, 2023
1 parent 5c3abba commit a3e6da5
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
# Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
Expand All @@ -19,8 +19,27 @@ name: Build and run integration tests
on: [push,pull_request]

jobs:
build:

pre_job:
# continue-on-error: true # Uncomment once integration is finished
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@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: 'true'
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
paths_ignore: '["deploy/**", "legal/src/main/resources/legal/**", "site/**", "**/logo", "jenkins/**", "**/*.md"]'
do_not_skip: '["workflow_dispatch", "schedule"]'

build:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit a3e6da5

Please sign in to comment.