2024-07-20 00:53:36 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
2024-07-20 01:41:04 +00:00
|
|
|
pre-run-notify:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-20 23:41:24 +00:00
|
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
2024-07-20 02:03:01 +00:00
|
|
|
id: post-status
|
2024-07-20 01:41:04 +00:00
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
|
|
status: "Started"
|
2024-07-25 01:13:19 +00:00
|
|
|
- run: echo ${{ steps.post-status.outputs.message-id }} >> /tmp/discord-message-id
|
|
|
|
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
path: /tmp/discord-message-id
|
|
|
|
name: "${{ github.sha }}-${{ github.run_number }}-discord-message-id"
|
|
|
|
overwrite: true
|
2024-07-20 00:53:36 +00:00
|
|
|
sast:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
- name: Check formatting
|
2024-07-25 01:20:34 +00:00
|
|
|
uses: https://github.com/psf/black@stable
|
|
|
|
with:
|
|
|
|
options: "--check --verbose"
|
|
|
|
version: "~= 24.0"
|
2024-07-20 00:53:36 +00:00
|
|
|
- name: Check import ordering
|
2024-07-25 01:20:34 +00:00
|
|
|
uses: https://github.com/isort/isort-action@v1
|
2024-07-20 02:03:01 +00:00
|
|
|
post-run-notify:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: always()
|
|
|
|
steps:
|
2024-07-25 01:13:19 +00:00
|
|
|
- uses: https://code.forgejo.org/forgejo/download-artifact@v4
|
|
|
|
with:
|
|
|
|
name: "${{ github.sha }}-${{ github.run_number }}-discord-message-id"
|
|
|
|
path: /tmp
|
|
|
|
- id: get-discord-message-id
|
|
|
|
run: echo "message-id=$(cat /tmp/discord-message-id)" >> $GITHUB_OUTPUT
|
2024-07-20 23:41:24 +00:00
|
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
2024-07-20 23:45:46 +00:00
|
|
|
if: ${{ success() }}
|
2024-07-20 02:03:01 +00:00
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
2024-07-20 23:45:46 +00:00
|
|
|
variant: "success"
|
2024-07-20 02:03:01 +00:00
|
|
|
status: "Success"
|
2024-07-25 01:13:19 +00:00
|
|
|
message-id: ${{ steps.get-discord-message-id.outputs.message-id }}
|
2024-07-20 23:45:46 +00:00
|
|
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
|
|
variant: "failure"
|
|
|
|
status: "Failure"
|
2024-07-25 01:13:19 +00:00
|
|
|
message-id: ${{ steps.get-discord-message-id.outputs.message-id }}
|