Skip to content

Commit

Permalink
Replace skip-duplicate logic with GH concurrency logic (pydata#6245)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Feb 9, 2022
1 parent e71de63 commit 48290fa
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/publish-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,15 @@ on:
types:
- completed

jobs:

skip-duplicate-jobs:
runs-on: ubuntu-latest
if: |
github.repository == 'pydata/xarray'
&& (github.event_name == 'push' || github.event_name == 'pull_request')
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
# For workflows which are triggered concurrently with the same
# contents, attempt to execute them exactly once.
concurrent_skipping: 'same_content_newer'
paths_ignore: '["**/doc/**"]'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-test-results:
name: Publish test results
runs-on: ubuntu-latest
needs: skip-duplicate-jobs
if: |
needs.skip-duplicate-jobs.outputs.should_skip != 'true'
&& github.event.workflow_run.conclusion != 'skipped'
if: github.event.workflow_run.conclusion != 'skipped'

steps:
- name: Download and extract artifacts
Expand Down

0 comments on commit 48290fa

Please sign in to comment.