From 551bfdea50c0961c2de40538365dc87de9acc372 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Mon, 6 Mar 2023 18:49:28 +0100 Subject: [PATCH] Add discord notifications --- .github/workflows/build.yml | 6 +++--- .github/workflows/discord-notify.yml | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/discord-notify.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0abf350..cc7c7513 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: name: Deploy artifacts needs: build runs-on: ubuntu-latest - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') + if: github.repository_owner == 'momo5502' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') steps: - name: Setup environment run: echo "BOIII_MASTER_PATH=${{ secrets.BOIII_MASTER_SSH_PATH }}" >> $GITHUB_ENV @@ -96,7 +96,7 @@ jobs: uses: actions/download-artifact@v3.0.2 with: name: Release Binary - + - name: Download Release data artifacts uses: actions/download-artifact@v3.0.2 with: @@ -107,7 +107,7 @@ jobs: uses: shimataro/ssh-key-action@v2.5.0 with: key: ${{ secrets.BOIII_MASTER_SSH_PRIVATE_KEY }} - known_hosts: 'just-a-placeholder-so-we-dont-get-errors' + known_hosts: "just-a-placeholder-so-we-dont-get-errors" - name: Add known hosts run: ssh-keyscan -H ${{ secrets.BOIII_MASTER_SSH_ADDRESS }} >> ~/.ssh/known_hosts diff --git a/.github/workflows/discord-notify.yml b/.github/workflows/discord-notify.yml new file mode 100644 index 00000000..1e1cbfe7 --- /dev/null +++ b/.github/workflows/discord-notify.yml @@ -0,0 +1,17 @@ +name: Notify Discord + +on: + push: + branches: + - "*" + issues: + +jobs: + notify: + runs-on: ubuntu-latest + if: github.repository_owner == 'momo5502' + steps: + - name: Send notification to Discord + uses: Ilshidur/action-discord@master + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_CI_BOT_WEBHOOK }}