mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-22 07:43:01 +00:00
Add notification for build success/failures
This commit is contained in:
parent
6584d95331
commit
4d4d63921b
3 changed files with 26 additions and 4 deletions
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
|
@ -121,7 +121,7 @@ jobs:
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
|
|
||||||
- name: Stylelint
|
- name: Stylelint
|
||||||
run: yarn stylelint
|
run: yarn stylelint -f github
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build --env production
|
run: yarn build --env production
|
||||||
|
@ -225,3 +225,25 @@ jobs:
|
||||||
branch: ${{ github.ref_name }}
|
branch: ${{ github.ref_name }}
|
||||||
major_version: ${{ needs.backend.outputs.major_version }}
|
major_version: ${{ needs.backend.outputs.major_version }}
|
||||||
version: ${{ needs.backend.outputs.version }}
|
version: ${{ needs.backend.outputs.version }}
|
||||||
|
|
||||||
|
notify:
|
||||||
|
name: Discord Notification
|
||||||
|
needs: [backend, unit_test, unit_test_postgres, integration_test]
|
||||||
|
if: ${{ !cancelled() && (github.ref_name == 'develop' || github.ref_name == 'main') }}
|
||||||
|
env:
|
||||||
|
STATUS: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Notify
|
||||||
|
uses: tsickert/discord-webhook@v5.3.0
|
||||||
|
with:
|
||||||
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
||||||
|
username: 'GitHub Actions'
|
||||||
|
avatar-url: 'https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png'
|
||||||
|
embed-title: "${{ github.workflow }}: ${{ env.STATUS == 'success' && 'Success' || 'Failure' }}"
|
||||||
|
embed-url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
|
||||||
|
embed-description: |
|
||||||
|
**Branch** ${{ github.ref }}
|
||||||
|
**Build** ${{ needs.backend.outputs.version }}
|
||||||
|
embed-color: ${{ env.STATUS == 'success' && '3066993' || '15158332' }}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
.token {
|
.token {
|
||||||
flex: 0 0 50%;
|
flex: 0 0 50%;
|
||||||
padding: 6px 6px;
|
padding: 6px;
|
||||||
background-color: var(--popoverTitleBackgroundColor);
|
background-color: var(--popoverTitleBackgroundColor);
|
||||||
font-family: $monoSpaceFontFamily;
|
font-family: $monoSpaceFontFamily;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex: 0 0 50%;
|
flex: 0 0 50%;
|
||||||
padding: 6px 6px;
|
padding: 6px;
|
||||||
background-color: var(--popoverBodyBackgroundColor);
|
background-color: var(--popoverBodyBackgroundColor);
|
||||||
|
|
||||||
.footNote {
|
.footNote {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"watch": "webpack --watch --config ./frontend/build/webpack.config.js",
|
"watch": "webpack --watch --config ./frontend/build/webpack.config.js",
|
||||||
"lint": "eslint --config frontend/.eslintrc.js --ignore-path frontend/.eslintignore frontend/",
|
"lint": "eslint --config frontend/.eslintrc.js --ignore-path frontend/.eslintignore frontend/",
|
||||||
"lint-fix": "yarn lint --fix",
|
"lint-fix": "yarn lint --fix",
|
||||||
"stylelint": "stylelint frontend/**/*.css --config frontend/.stylelintrc"
|
"stylelint": "stylelint \"frontend/**/*.css\" --config frontend/.stylelintrc"
|
||||||
},
|
},
|
||||||
"repository": "https://github.com/Sonarr/Sonarr",
|
"repository": "https://github.com/Sonarr/Sonarr",
|
||||||
"author": "Team Sonarr",
|
"author": "Team Sonarr",
|
||||||
|
|
Loading…
Reference in a new issue