From 32ffc099d3dc97d70832796d21a346206734a0b9 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sun, 21 Jul 2024 13:25:34 -0400 Subject: [PATCH] ci: add discordops via webhook --- .forgejo/workflows/ci.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8452b9f..7f5def3 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -7,6 +7,14 @@ env: REGISTRY_ENDPOINT: host.containers.internal:5000 jobs: + pre-run: + runs-on: ubuntu-latest + steps: + - uses: https://forge.karnov.club/marc/push-status-to-discord-action@main + with: + webhook-url: ${{secrets.DISCORD_WEBHOOK_URL}} + status: "Started" + init: true build-images: runs-on: ubuntu-latest strategy: @@ -31,4 +39,19 @@ jobs: run: | podman push ${{ steps.image-metadata.outputs.full-image-name }} ${{ env.REGISTRY_ENDPOINT }}/forge-runners/${{ steps.image-metadata.outputs.full-image-name }} podman push ${{ steps.image-metadata.outputs.full-image-name }} ${{ env.REGISTRY_ENDPOINT }}/forge-runners/${{ matrix.image-name }}:latest - + post-run: + runs-on: ubuntu-latest + needs: [build-images] + steps: + - uses: https://forge.karnov.club/marc/push-status-to-discord-action@main + if: ${{success()}} + with: + webhook-url: ${{secrets.DISCORD_WEBHOOK_URL}} + status: "Success" + variant: "success" + - uses: https://forge.karnov.club/marc/push-status-to-discord-action@main + if: ${{failure()}} + with: + webhook-url: ${{secrets.DISCORD_WEBHOOK_URL}} + status: "Failure" + variant: "failure"