Skip to content

Commit

Permalink
Fix nasa#83, Relax push trigger for workflows
Browse files Browse the repository at this point in the history
Enable format-check and static-analysis workflows to run on push to
arbitrary branches.

Enable CodeQL workflow to run on pull requests targeting arbitrary
branches.
  • Loading branch information
astrogeco committed Sep 11, 2021
1 parent 3eeae68 commit 5c3810f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/codeql-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: "CodeQL Analysis"

on:
push:
pull_request:
branches:
- main
pull_request:

env:
SIMULATION: native
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ name: Format Check
# Run on main push and pull requests
on:
push:
branches:
- main
pull_request:

jobs:

static-analysis:
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"]'

format-check:
name: Run format check
needs: check-for-duplicates
runs-on: ubuntu-18.04
timeout-minutes: 15

Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,26 @@ name: Static Analysis
# Run on main push and pull requests
on:
push:
branches:
- main
pull_request:

jobs:

static-analysis:
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"]'

cpp-check:
name: Run cppcheck
needs: check-for-duplicates
runs-on: ubuntu-18.04
timeout-minutes: 15

Expand Down

0 comments on commit 5c3810f

Please sign in to comment.