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 name: Deploy artifacts
needs: build needs: build
runs-on: ubuntu-latest 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: steps:
- name: Setup environment - name: Setup environment
run: echo "BOIII_MASTER_PATH=${{ secrets.BOIII_MASTER_SSH_PATH }}" >> $GITHUB_ENV run: echo "BOIII_MASTER_PATH=${{ secrets.BOIII_MASTER_SSH_PATH }}" >> $GITHUB_ENV
@ -107,7 +107,7 @@ jobs:
uses: shimataro/ssh-key-action@v2.5.0 uses: shimataro/ssh-key-action@v2.5.0
with: with:
key: ${{ secrets.BOIII_MASTER_SSH_PRIVATE_KEY }} 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 - name: Add known hosts
run: ssh-keyscan -H ${{ secrets.BOIII_MASTER_SSH_ADDRESS }} >> ~/.ssh/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 }}