-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from RocketChat/rodrigok-patch-1
Update README.md
- Loading branch information
Showing
4 changed files
with
29 additions
and
84 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
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
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 |
---|---|---|
@@ -1,106 +1,61 @@ | ||
name: Check notification | ||
|
||
on: [pull_request, push] | ||
on: [push] | ||
|
||
jobs: | ||
success: | ||
name: Works properly | ||
runs-on: ubuntu-18.04 | ||
notifications: | ||
name: Rocket.Chat Notifications | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Rocket.Chat Notification | ||
- name: with mention | ||
uses: ./ | ||
if: always() | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Success*' | ||
mention: 'here' | ||
mention_if: 'failure' | ||
channel: '#develop' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
|
||
success_no_mention: | ||
name: Works properly without mention | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Rocket.Chat Notification | ||
- name: with mention on success | ||
uses: ./ | ||
if: always() | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Success no mention*' | ||
channel: '#develop' | ||
job_name: ':robot_face: *Success*' | ||
mention: 'here' | ||
mention_if: 'success' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
|
||
failure: | ||
name: Works failed | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Forced failure | ||
run: exit 1 | ||
|
||
- name: Rocket.Chat Notification | ||
- name: with mention on always | ||
uses: ./ | ||
if: failure() | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Failure*' | ||
job_name: ':robot_face: *Success*' | ||
mention: 'here' | ||
mention_if: 'failure' | ||
channel: '#develop' | ||
mention_if: 'success' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
|
||
- name: Check if work properly | ||
if: failure() | ||
run: | | ||
echo 'Rocket.Chat failure notification succeeded' | ||
exit 0 | ||
cancel: | ||
# You have to cancel this job | ||
name: Works canceled | ||
runs-on: ubuntu-18.04 | ||
needs: success | ||
timeout-minutes: 1 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Wait | ||
run: sleep 70 | ||
|
||
- name: Rocket.Chat Notification | ||
- name: with mention on failure only | ||
uses: ./ | ||
if: cancelled() | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Cancel*' | ||
job_name: ':robot_face: *Success no mention*' | ||
mention: 'here' | ||
mention_if: 'always' | ||
channel: '#develop' | ||
mention_if: 'failure' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
|
||
- name: Check if work properly | ||
if: cancelled() | ||
run: | | ||
echo 'Rocket.Chat cancelled notification succeeded' | ||
exit 0 | ||
commit: | ||
name: Include commit data | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: with no mention | ||
uses: ./ | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Success no mention*' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
|
||
- uses: ./ | ||
- name: with commit info | ||
uses: ./ | ||
with: | ||
type: ${{ job.status }} | ||
job_name: ':robot_face: *Commit*' | ||
channel: '#develop' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
commit: 'true' | ||
url: ${{ secrets.ROCKETCHAT_WEBHOOK }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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