Skip to content

Commit

Permalink
chore(ci-deps): Update files based on repository configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pleo-file-distributor[bot] authored May 2, 2024
1 parent 69ff14e commit ae90174
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ env:
GRADLE_SCRIPT_PATH: ./gradlew
setWizCliDepsScanPath: .
setWizCliDepsPolicy: Pleo-Default-vulnerabilities-policy
runWizCliDepsScan: false

jobs:
preflight:
name: Determine if CodeQL should run
runs-on: ubuntu-latest
outputs:
should_run_analyze: ${{ steps.maybe_skip_analyze.outputs.should_run_analyze }}
should_run_wiz_cli: ${{ steps.maybe_skip_wiz_cli.outputs.should_run_wiz_cli }}
working_language: ${{steps.working_language_step.outputs.WORKING_LANGUAGE}}
steps:
- uses: winterjung/split@a211a1c46e35fcdc4097d59dd6282d4a9859651b # v2
Expand Down Expand Up @@ -67,12 +69,24 @@ jobs:
echo "Running CodeQL analysis"
echo "should_run_analyze=true" >> "$GITHUB_OUTPUT"
fi
- id: maybe_skip_wiz_cli
name: Check if Wiz-CLI Deps Scan should run
shell: bash
run: |
if [[ "${{ env.runWizCliDepsScan }}" == "true" ]]; then
echo "should_run_wiz_cli=true" >> "$GITHUB_OUTPUT"
else
echo "should_run_wiz_cli=false" >> "$GITHUB_OUTPUT"
fi
- id: working_language_step
name: We check if the repository language is supported by CodeQL
run: echo "WORKING_LANGUAGE=${{env[format('language_{0}', github.event.repository.language)]}}" >> "$GITHUB_OUTPUT"

wiz-cli:
name: Scan Dependencies with Wiz CLI
if: ${{ needs.preflight.outputs.should_run_wiz_cli == 'true'}}
needs:
- preflight
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -115,7 +129,6 @@ jobs:
if: ${{ (needs.preflight.outputs.should_run_analyze == 'true') && (needs.preflight.outputs.working_language != '')}}
needs:
- preflight
- wiz-cli
runs-on: codeql-runner
timeout-minutes: 30
permissions:
Expand Down

0 comments on commit ae90174

Please sign in to comment.