From 7a4899a42524dd80b5b001c62c141368d1936146 Mon Sep 17 00:00:00 2001 From: NightScript Date: Wed, 16 Sep 2020 11:01:29 -0700 Subject: [PATCH] Merge webhook jobs --- .github/workflows/build.yml | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4764dbf..5f39896 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,8 +11,8 @@ on: jobs: build: runs-on: ubuntu-latest - container: devkitpro/devkitarm - name: "Build with Docker using devKitARM r54" + container: devkitpro/devkitarm:20200730 + name: "Build with Docker using devKitARM r55" outputs: commit_tag: ${{ steps.build.outputs.commit_tag }} commit_message: ${{ steps.build.outputs.commit_message }} @@ -126,40 +126,26 @@ jobs: curl -XPOST -H "$AUTH_HEADER" -H "$CONTENT_LENGTH" -H "$CONTENT_TYPE" --upload-file "$file" "$UPLOAD_URL" done - send_webhook_success: + send_webhook: runs-on: ubuntu-latest needs: [publish_build_twlbot, build] - name: "Send Discord success webhook" - if: ${{ success() && !startsWith(github.ref, 'refs/pull') }} + name: "Send Discord webhook" + if: ${{ !startsWith(github.ref, 'refs/pull') }} env: COMMIT_TAG: ${{ needs.build.outputs.commite_tag }} COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }} CURRENT_DATE: ${{ needs.publish_build_twlbot.outputs.current_date }} TWLBOT_COMMIT: ${{ needs.publish_build_twlbot.outputs.twlbot_commit }} steps: - - name: "Checkout repo" - uses: actions/checkout@v1 - name: "Send success webhook" + if: ${{ success() }} run: | curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-ghactions.sh chmod +x send.sh export IMAGE=https://raw.githubusercontent.com/Universal-Team/extras/v$CURRENT_DATE/builds/Universal-Updater/Universal-Updater.png ./send.sh success ${{ secrets.WEBHOOK_URL }} - - send_webhook_failure: - runs-on: ubuntu-latest - needs: [publish_build_twlbot, build] - name: "Send Discord failure webhook" - if: ${{ failure() && !startsWith(github.ref, 'refs/pull') }} - env: - COMMIT_TAG: ${{ needs.build.outputs.commite_tag }} - COMMIT_MESSAGE: ${{ needs.build.outputs.commit_message }} - CURRENT_DATE: ${{ needs.publish_build_twlbot.outputs.current_date }} - TWLBOT_COMMIT: ${{ needs.publish_build_twlbot.outputs.twlbot_commit }} - steps: - - name: "Checkout repo" - uses: actions/checkout@v1 - name: "Send failure webhook" + if: ${{ failure() }} run: | curl -o send.sh https://raw.githubusercontent.com/Universal-Team/discord-webhooks/master/send-ghactions.sh chmod +x send.sh