Skip to content

Commit 2966f5f

Browse files
authored
Merge pull request #1 from RocketChat/rodrigok-patch-1
Update README.md
2 parents 8623b89 + 9f7ebd9 commit 2966f5f

File tree

4 files changed

+29
-84
lines changed

4 files changed

+29
-84
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
name: TS Lint Check
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
paths:
8-
- src/*
9-
pull_request:
10-
branches:
11-
- master
12-
paths:
13-
- src/*
3+
on: push
144

155
jobs:
166
lint:
177
name: Lint Check
18-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-latest
199
steps:
2010
- uses: actions/checkout@master
2111

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Prepare for release
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- '*'
77

88
jobs:
99
release:
1010
name: Build production
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v1
1414

.github/workflows/test.yml

Lines changed: 24 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,61 @@
11
name: Check notification
22

3-
on: [pull_request, push]
3+
on: [push]
44

55
jobs:
6-
success:
7-
name: Works properly
8-
runs-on: ubuntu-18.04
6+
notifications:
7+
name: Rocket.Chat Notifications
8+
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@master
1111

12-
- name: Rocket.Chat Notification
12+
- name: with mention
1313
uses: ./
14-
if: always()
1514
with:
1615
type: ${{ job.status }}
1716
job_name: ':robot_face: *Success*'
1817
mention: 'here'
19-
mention_if: 'failure'
20-
channel: '#develop'
2118
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
2219

23-
success_no_mention:
24-
name: Works properly without mention
25-
runs-on: ubuntu-18.04
26-
steps:
27-
- uses: actions/checkout@master
28-
29-
- name: Rocket.Chat Notification
20+
- name: with mention on success
3021
uses: ./
31-
if: always()
3222
with:
3323
type: ${{ job.status }}
34-
job_name: ':robot_face: *Success no mention*'
35-
channel: '#develop'
24+
job_name: ':robot_face: *Success*'
25+
mention: 'here'
26+
mention_if: 'success'
3627
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
3728

38-
failure:
39-
name: Works failed
40-
runs-on: ubuntu-18.04
41-
steps:
42-
- uses: actions/checkout@master
43-
44-
- name: Forced failure
45-
run: exit 1
46-
47-
- name: Rocket.Chat Notification
29+
- name: with mention on always
4830
uses: ./
49-
if: failure()
5031
with:
5132
type: ${{ job.status }}
52-
job_name: ':robot_face: *Failure*'
33+
job_name: ':robot_face: *Success*'
5334
mention: 'here'
54-
mention_if: 'failure'
55-
channel: '#develop'
35+
mention_if: 'success'
5636
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
5737

58-
- name: Check if work properly
59-
if: failure()
60-
run: |
61-
echo 'Rocket.Chat failure notification succeeded'
62-
exit 0
63-
64-
cancel:
65-
# You have to cancel this job
66-
name: Works canceled
67-
runs-on: ubuntu-18.04
68-
needs: success
69-
timeout-minutes: 1
70-
steps:
71-
- uses: actions/checkout@master
72-
73-
- name: Wait
74-
run: sleep 70
75-
76-
- name: Rocket.Chat Notification
38+
- name: with mention on failure only
7739
uses: ./
78-
if: cancelled()
7940
with:
8041
type: ${{ job.status }}
81-
job_name: ':robot_face: *Cancel*'
42+
job_name: ':robot_face: *Success no mention*'
8243
mention: 'here'
83-
mention_if: 'always'
84-
channel: '#develop'
44+
mention_if: 'failure'
8545
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
8646

87-
- name: Check if work properly
88-
if: cancelled()
89-
run: |
90-
echo 'Rocket.Chat cancelled notification succeeded'
91-
exit 0
92-
93-
commit:
94-
name: Include commit data
95-
runs-on: ubuntu-18.04
96-
steps:
97-
- uses: actions/checkout@master
47+
- name: with no mention
48+
uses: ./
49+
with:
50+
type: ${{ job.status }}
51+
job_name: ':robot_face: *Success no mention*'
52+
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
9853

99-
- uses: ./
54+
- name: with commit info
55+
uses: ./
10056
with:
10157
type: ${{ job.status }}
10258
job_name: ':robot_face: *Commit*'
103-
channel: '#develop'
104-
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
10559
commit: 'true'
60+
url: ${{ secrets.ROCKETCHAT_WEBHOOK }}
10661
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![GitHub](https://img.shields.io/github/license/RocketChat/Rocket.Chat.GitHub.Action.Notification?color=brightgreen)
66

77
This is Rocket.Chat Notification for GitHub Actions.<br>
8-
Generated from [actions/javascript-template](https://github.com/actions/javascript-template).
8+
Forked from [homoluctus/slatify](https://github.com/homoluctus/slatify). Thanks a lot for your awesome work!
99

1010
# Feature
1111
- Notify the result of GitHub Actions

0 commit comments

Comments
 (0)