Skip to content

Commit

Permalink
Fix #2006, Static Analysis Add Duplicate Check and Remove Main Push
Browse files Browse the repository at this point in the history
  • Loading branch information
arielswalker committed Oct 22, 2021
1 parent 50c139f commit 9a4d505
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,27 @@ name: Static Analysis
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- main
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"]'

static-analysis:
#Continue if check-for-duplicates found no duplicates. Always runs for pull-requests.
needs: check-for-duplicates
if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }}
name: Run cppcheck
runs-on: ubuntu-18.04
timeout-minutes: 15
Expand Down

0 comments on commit 9a4d505

Please sign in to comment.