Skip to content

Commit

Permalink
TEST post to discord on scheduled builds
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Oct 24, 2024
1 parent ee888b0 commit b351c4d
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
Run-E2E-Tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -117,4 +116,31 @@ jobs:
- name: "Destroy the KinD cluster"
run: >-
kind delete cluster -n dcp-demo
kind delete cluster -n dcp-demo
Secrets-Presence:
name: "Check for required credentials"
runs-on: ubuntu-latest
outputs:
HAS_WEBHOOK: ${{ steps.secrets-presence.outputs.HAS_WEBHOOK }}
steps:
- name: Check whether secrets exist
id: secrets-presence
run: |
[ ! -z "${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}" ] && echo "HAS_WEBHOOK=true" >> $GITHUB_OUTPUT
exit 0
Post-To-Discord:
needs: [ Run-E2E-Tests, Secrets-Presence ]
if: "needs.Secrets-Presence.outputs.HAS_WEBHOOK && always() && github.event_name == 'schedule'"
runs-on: ubuntu-latest
steps:
- uses: sarisia/actions-status-discord@v1
name: "Post discord webhook"
with:
webhook: ${{ secrets.DISCORD_GITHUB_CI_WEBHOOK }}
# if the publishing is skipped, that means the preceding test run failed
status: ${{ needs.Run-E2E-Tests.result == 'skipped' && 'Failure' || needs.Run-E2E-Tests.result }}
title: "Nightly MVD E2E-Test"
description: Nightly E2E test run against the latest artefacts"
username: GitHub Actions

0 comments on commit b351c4d

Please sign in to comment.