From 4846c6abc4f7d3eaa25ffc53c96cdfa738481ce4 Mon Sep 17 00:00:00 2001 From: Joe Harrison <53116754+sudo-kraken@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:47:08 +0100 Subject: [PATCH] ci(ci.yml,release.yml): removes the need for 3rd party actions (#2018) * ci(ci.yml,release.yml): removes the need for 3rd party actions This will stop the need to use `sarisia/actions-status-discord` & `technote-space/workflow-conclusion-action` * revert(ci.yml): added the logic back to the if condition --- .github/workflows/ci.yml | 44 +++++++++++++++++++++----------- .github/workflows/release.yml | 47 ++++++++++++++++++++++------------- 2 files changed, 60 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 838b05be4..2dbbb9891 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,20 +173,36 @@ jobs: if: always() && github.event_name != 'pull_request' && !contains(github.event.head_commit.message, '[skip ci]') runs-on: ubuntu-24.04 steps: - - name: Combine Job Status + - name: Determine Workflow Status id: status run: | - failures=(neutral, skipped, timed_out, action_required) - if [[ ${array[@]} =~ ${{ needs.publish.result }} ]]; then - echo "status=failure" >> $GITHUB_OUTPUT - else - echo "status=${{ needs.publish.result }}" >> $GITHUB_OUTPUT - fi + case "${{ needs.publish.result }}" in + success) echo "status=Success" >> $GITHUB_OUTPUT; echo "colour=3066993" >> $GITHUB_OUTPUT ;; + failure) echo "status=Failure" >> $GITHUB_OUTPUT; echo "colour=15158332" >> $GITHUB_OUTPUT ;; + cancelled) echo "status=Cancelled" >> $GITHUB_OUTPUT; echo "colour=10181046" >> $GITHUB_OUTPUT ;; + *) echo "status=Skipped" >> $GITHUB_OUTPUT; echo "colour=9807270" >> $GITHUB_OUTPUT ;; + esac - - name: Post Status to Discord - uses: sarisia/actions-status-discord@58667542682a27f270460405363e3a982f57a7ee # v1.0.0 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true + - name: Send Discord notification + shell: bash + run: | + WEBHOOK="${{ secrets.DISCORD_WEBHOOK }}" + + PAYLOAD=$(cat <> $GITHUB_OUTPUT - else - echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT - fi + case "${{ needs.publish.result }}" in + success) echo "status=Success" >> $GITHUB_OUTPUT; echo "colour=3066993" >> $GITHUB_OUTPUT ;; + failure) echo "status=Failure" >> $GITHUB_OUTPUT; echo "colour=15158332" >> $GITHUB_OUTPUT ;; + cancelled) echo "status=Cancelled" >> $GITHUB_OUTPUT; echo "colour=10181046" >> $GITHUB_OUTPUT ;; + *) echo "status=Skipped" >> $GITHUB_OUTPUT; echo "colour=9807270" >> $GITHUB_OUTPUT ;; + esac - - name: Post Status to Discord - uses: sarisia/actions-status-discord@58667542682a27f270460405363e3a982f57a7ee # v1.0.0 - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} - status: ${{ steps.status.outputs.status }} - title: ${{ github.workflow }} - nofail: true + - name: Send Discord notification + shell: bash + run: | + WEBHOOK="${{ secrets.DISCORD_WEBHOOK }}" + + PAYLOAD=$(cat <