ci: pass message-id between jobs
This commit is contained in:
parent
c845bea64b
commit
8e7f5b4d92
1 changed files with 14 additions and 1 deletions
|
@ -10,7 +10,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
status: "Started"
|
status: "Started"
|
||||||
- run: echo ${{ steps.post-status.outputs.message-id }}
|
- 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
|
||||||
sast:
|
sast:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -26,15 +31,23 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
|
- 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
|
||||||
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
||||||
if: ${{ success() }}
|
if: ${{ success() }}
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
variant: "success"
|
variant: "success"
|
||||||
status: "Success"
|
status: "Success"
|
||||||
|
message-id: ${{ steps.get-discord-message-id.outputs.message-id }}
|
||||||
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
- uses: https://forge.karnov.club/marc/push-status-to-discord-action@main
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
variant: "failure"
|
variant: "failure"
|
||||||
status: "Failure"
|
status: "Failure"
|
||||||
|
message-id: ${{ steps.get-discord-message-id.outputs.message-id }}
|
||||||
|
|
Loading…
Reference in a new issue