43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
on:
|
|
push:
|
|
|
|
jobs:
|
|
pre-run-notify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
|
id: post-status
|
|
with:
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
project-name: ${{ github.repository }}
|
|
status: "Started"
|
|
init: true
|
|
sast:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
- name: Install pipx
|
|
run: pip install pipx
|
|
- name: Check formatting
|
|
run: pipx run black . --check
|
|
- name: Check import ordering
|
|
run: pipx run isort . --check
|
|
post-run-notify:
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
|
if: ${{ success() }}
|
|
with:
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
project-name: ${{ github.repository }}
|
|
variant: "success"
|
|
status: "Success"
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
|
if: ${{ failure() }}
|
|
with:
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
project-name: ${{ github.repository }}
|
|
variant: "failure"
|
|
status: "Failure"
|