Skip to content

Commit

Permalink
docs: updated README to reflect to new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ravgeetdhillon committed May 27, 2021
1 parent 7703ef8 commit 73f2261
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ status:
description: Job Status
required: true

token:
description: Github Token for accessing workflow url
required: false
default: ''

notification_title:
description: Specify on the notification message title
required: false
Expand All @@ -32,7 +37,7 @@ message_format:
footer:
description: Specify the footer of the message
required: false
default: 'Developed by <https://www.ravsam.in|RavSam>'
default: "<{run_url}|View Run> | Developed by <https://www.ravsam.in|RavSam>"

notify_when:
description: Specify on which events a slack notification is sent
Expand Down Expand Up @@ -71,10 +76,14 @@ The following variables are available for formatting your own strings.
- {repo}
- {repo_url}
- {status_message}
- {run_url}
- {workflow}
- {workflow_url}
You can use these to construct custom `notification_title`, `message_format` and `footer`. To get an idea see the workflow below.

> In order to use `{workflow_url}`, specify as the token input as `token: ${{ secrets.GITHUB_TOKEN }}`.

### Minimal workflow

![](screenshots/minimal.png)
Expand All @@ -99,9 +108,10 @@ steps:
if: always()
with:
status: ${{ job.status }}
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: '{workflow} has {status_message}'
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>'
footer: 'Linked Repo <{repo_url}|{repo}>'
footer: 'Linked Repo <{repo_url}|{repo}> | <{workflow_url}|View Workflow>'
notify_when: 'failure'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
footer:
description: Specify the footer of the message
required: false
default: "<{run_url}|View Run> | <{workflow_url}|View Workflow> | Developed by <https://www.ravsam.in|RavSam>"
default: "<{run_url}|View Run> | Developed by <https://www.ravsam.in|RavSam>"
notify_when:
description: Specify on which events a slack notification is sent
required: false
Expand Down

0 comments on commit 73f2261

Please sign in to comment.