Skip to content

Commit 0bc3365

Browse files
authored
slack notif and presentation artifact examples
1 parent bf40ce0 commit 0bc3365

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

integrations/github/workflows/ReadMe.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,30 @@
5151
### Step 5. Congratulations! You now know how to create and run browser tests with GitHub Actions/Workflows!
5252

5353
### **Study [SeleniumBase](https://github.com/seleniumbase/SeleniumBase) to learn more!**
54+
55+
56+
### Slack notifications:
57+
* the action [rtCamp/action-slack-notify](https://github.com/rtCamp/action-slack-notify) is just one of the many slack notification actions available
58+
* create a slack integration webhook if you don't have one already
59+
* create a `SLACK_WEBHOOK` secret on your repository with the webhook token value
60+
* for this particular action, `SLACK_CHANNEL` is optional environment variable and will default to the webhook token channel if not specified
61+
* this example shows how you can put a link to your github action workflow as the `SLACK_MESSAGE` (good for people to see artifacts you can push up such as the SeleniumBase Presenter)
62+
```
63+
- name: Slack notification
64+
uses: rtCamp/action-slack-notify@master
65+
env:
66+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
67+
SLACK_CHANNEL: general
68+
SLACK_ICON_EMOJI: rocket
69+
SLACK_USERNAME: SeleniumBase
70+
SLACK_MESSAGE: 'Actions workflow completed successful! :tada: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
71+
```
72+
73+
### Upload a SeleniumBase presentation as an artifact
74+
* Here is an example how to use [upload-artifact@v2](https://github.com/actions/upload-artifact) to push up a SeleniumBase generated presentation as an artifact. (You can use this in conjunction with the Slack notification to grab and or view the presentation directly from github)
75+
```
76+
- uses: actions/upload-artifact@v2
77+
with:
78+
name: Click here to download SeleniumBase presentation!
79+
path: saved_presentations/my_presentation.html
80+
```

0 commit comments

Comments
 (0)