Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing code ql passed if change in ignored paths #10558

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,51 @@ name: "CodeQL"

on:
push:
branches: [develop, master]
branches: [develop, master, testing_CodeQL_passed_if_change_in_ignored_paths]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
branches: [develop, testing_CodeQL_passed_if_change_in_ignored_paths]
paths-ignore:
- 'e2e/resources/**'
- 'docs/**'
schedule:
- cron: '0 5 * * 0'

jobs:
check-paths:
runs-on: ubuntu-latest
outputs:
skip_codeql: ${{ steps.check.outputs.skip_codeql }}

steps:
- name: Checkout repository
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Check for ignored paths
id: check
run: |
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
echo "Changed files: $changed_files"
if echo "$changed_files" | grep -qvE '^(e2e/resources/|docs/)'; then
echo "CodeQL will run"
echo "::set-output name=skip_codeql::true"
echo "skip_codeql=false" >> $GITHUB_ENV
echo "skip_codeql=false" >> $GITHUB_OUTPUT
else
echo "CodeQL will be skipped"
echo "::set-output name=skip_codeql::false"
echo "skip_codeql=true" >> $GITHUB_ENV
echo "skip_codeql=true" >> $GITHUB_OUTPUT
fi

analyze:
name: Analyze
needs: check-paths
if: needs.check-paths.outputs.skip_codeql == 'false'
runs-on: ubuntu-latest

steps:
Expand Down
Binary file modified e2e/resources/activiti7/simpleapp.zip
Binary file not shown.
Loading