Skip to content

Commit

Permalink
Merge pull request #830 from n3dst4/skip-duplicate-actions
Browse files Browse the repository at this point in the history
Skip duplicate workflow runs
  • Loading branch information
n3dst4 committed Jul 15, 2024
2 parents d9c58bd + 85ae8e2 commit 2435462
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ env:
DOWNLOAD_BASE: "https://github.com/${{github.repository}}/releases/download"

jobs:
pre_job:
# see https://github.com/marketplace/actions/skip-duplicate-actions
# prevents duplicate workflow runs when they get triggered by e.g. `push`
# and `pull_request` events
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: same_content_newer

ci-cd:
# annoyingly, reusable workflows have to be in .github/workflows, either of
# the local repo or a shared repo. There's literally no way of referencing
Expand All @@ -23,6 +36,8 @@ jobs:
# Reusable workflows docs:
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
uses: lumphammer/gh-actions/.github/workflows/ci-cd-reusable.yml@2024-06-15
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
permissions:
contents: write
with:
Expand Down

0 comments on commit 2435462

Please sign in to comment.