Browse Source

Add skip logic to Github CI

Skip duplicate CI runs with the same content
Skip concurrent CI runs of the same content
Cancel old CI runs when a newer commit is pushed on top of a branch
Skip CI builds which change documentation and non-build related config files

Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
pull/605/head
Emily Mabrey 10 months ago
parent
commit
aa3d5c096c
No known key found for this signature in database GPG Key ID: 6F4EF47256A1B7DC
  1. 31
      .github/workflows/cmake_build.yml

31
.github/workflows/cmake_build.yml

@ -12,7 +12,38 @@ defaults:
shell: bash
jobs:
skip_test:
name: "CI Build Skipping Logic"
runs-on: ubuntu-latest
permissions:
actions: write
checks: read
contents: read
deployments: read
issues: read
discussions: read
packages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '[]'
paths_ignore: '["**/**.md", "**/**.dox2", "**/**.dox", "**/**.dox.in", "**/LICENSE.txt", "/.builds/**", "/.github/ISSUE_TEMPLATE/**", "/.github/funding.yml", "/.vscode/**"]'
do_not_skip: '["workflow_dispatch", "schedule"]'
cancel_others: 'true'
skip_after_successful_duplicate: 'true'
concurrent_skipping: 'same_content_newer'
build:
needs: skip_test
if: ${{ needs.skip_test.outputs.should_skip != 'true' }}
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:

Loading…
Cancel
Save