CodeQL #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CodeQL | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
workflow_dispatch: | |
inputs: | |
slack-notify: | |
description: 'Notify Slack' | |
required: true | |
default: 'true' | |
type: choice | |
options: | |
- 'true' | |
- 'false' | |
schedule: | |
- cron: '44 4 * * 1' | |
env: | |
SLACK_NOTIFY: true | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
analyze: | |
name: Analyze | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-codeql.yml@master | |
with: | |
languages: "['python']" | |
set-slack-notify: | |
name: Set Slack Notify | |
runs-on: ubuntu-latest | |
outputs: | |
slack-notify: ${{ steps.set-slack-notify.outputs.slack-notify }} | |
steps: | |
- name: Set Slack Notify | |
id: set-slack-notify | |
run: | | |
echo "slack-notify=${{ github.event.inputs.slack-notify || env.SLACK_NOTIFY }}" >> "${GITHUB_OUTPUT}" | |
slack-workflow-status: | |
if: always() | |
name: Slack (Local) | |
needs: | |
- analyze | |
- set-slack-notify | |
uses: WolfSoftware/reusable-workflows/.github/workflows/reusable-slack.yml@master | |
with: | |
slack_notify: ${{ needs.set-slack-notify.outputs.slack-notify }} | |
secrets: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |