Add discord notifications

This commit is contained in:
Maurice Heumann 2023-03-06 18:49:28 +01:00
parent 6f2dbbe471
commit 551bfdea50
2 changed files with 20 additions and 3 deletions

View File

@ -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

17
.github/workflows/discord-notify.yml vendored Normal file
View File

@ -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 }}