Skip to content

CodeQL

CodeQL #7

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 }}