-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch slack notifications to discord
- Loading branch information
Showing
1 changed file
with
10 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,16 +55,13 @@ jobs: | |
env: | ||
RELEASE_GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} | ||
|
||
- name: Notify slack | ||
- name: Notify discord | ||
if: always() && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.repository_owner == 'vlingo' | ||
uses: rtCamp/action-slack-notify@v2 | ||
uses: 'Ilshidur/action-[email protected]' | ||
env: | ||
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}" | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: ci-cd | ||
SLACK_USERNAME: Bob the Builder | ||
SLACK_ICON: 'https://vlingo.io/wp-content/uploads/cropped-vlingo-favicon-180x180.png' | ||
SLACK_FOOTER: '${{ github.repository }}:${{ steps.version.outputs.xoom_version }}' | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
DISCORD_USERNAME: Bob the Builder | ||
DISCORD_EMBEDS: '[{"title":"Build ${{ job.status }}", "description":"[${{ github.repository }}:${{ steps.version.outputs.xoom_version }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})","author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "${{ github.server_url }}/${{ github.actor }}"},"color":"${{ job.status == ''success'' && ''65280'' || ''16711680'' }}"}]' | ||
|
||
- name: Cleanup | ||
run: rm -rf ~/.m2/repository/io/vlingo | ||
|
@@ -121,15 +118,10 @@ jobs: | |
org.opencontainers.image.created=${{ steps.version.outputs.created }} | ||
org.opencontainers.image.revision=${{ github.sha }} | ||
- name: Notify slack | ||
- name: Notify discord | ||
if: failure() && steps.version.outputs.push == 'true' | ||
uses: rtCamp/action-slack-notify@v2 | ||
uses: 'Ilshidur/action-[email protected]' | ||
env: | ||
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}" | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: ci-cd | ||
SLACK_USERNAME: Suzi the Publisher | ||
SLACK_ICON: 'https://vlingo.io/wp-content/uploads/cropped-vlingo-favicon-180x180.png' | ||
SLACK_FOOTER: '${{ github.repository }}' | ||
SLACK_TITLE: 'Docker Image' | ||
SLACK_MESSAGE: ':rocket: ${{ steps.version.outputs.version }}' | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
DISCORD_USERNAME: Suzi the Publisher | ||
DISCORD_EMBEDS: '[{"title":"Docker Image Build ${{ job.status }}", "description":":rocket: [${{ github.repository }}:${{ steps.version.outputs.xoom_version }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})","author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "${{ github.server_url }}/${{ github.actor }}"},"color":"${{ job.status == ''success'' && ''65280'' || ''16711680'' }}"}]' |