Skip to content

Commit

Permalink
Merge pull request #1 from RocketChat/rodrigok-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
rodrigok authored Nov 23, 2019
2 parents 8623b89 + 9f7ebd9 commit 2966f5f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 84 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
name: TS Lint Check

on:
push:
branches:
- master
paths:
- src/*
pull_request:
branches:
- master
paths:
- src/*
on: push

jobs:
lint:
name: Lint Check
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Prepare for release
on:
push:
tags:
- 'v*'
- '*'

jobs:
release:
name: Build production
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

Expand Down
93 changes: 24 additions & 69 deletions .github/workflows/test.yml
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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
![GitHub](https://img.shields.io/github/license/RocketChat/Rocket.Chat.GitHub.Action.Notification?color=brightgreen)

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

# Feature
- Notify the result of GitHub Actions
Expand Down

0 comments on commit 2966f5f

Please sign in to comment.