Skip to content

Commit

Permalink
chore: skip CodeQL if go files have no changes (#636)
Browse files Browse the repository at this point in the history
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
  • Loading branch information
lingsamuel committed Aug 18, 2021
1 parent d8854c3 commit d7128a1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,31 @@ on:
- cron: '25 5 * * 5'

jobs:
changes:
runs-on: ubuntu-latest
outputs:
go: ${{ steps.filter.outputs.go }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- uses: ./.github/actions/paths-filter
id: filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
go:
- '*.go'
- '**/*.go'
analyze:
name: Analyze
runs-on: ubuntu-latest

needs: changes
if: |
(needs.changes.outputs.go == 'true')
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit d7128a1

Please sign in to comment.