-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (37 loc) · 1.22 KB
/
notify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Send Notifications
on:
#
# Execute the workflow only if build and deploy was successful
# By dependency, the workflow should only execute on a push to main
#
workflow_run:
workflows:
- "Publish Release"
types:
- completed
env:
BLOG_POST_TWITTER_NOTIFICATION_BODY:
jobs:
twitter_notify:
name: Send notification on Twitter
runs-on: ubuntu-latest
if: contains( join(github.event.commits.*.message), 'New blog post')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
cache: 'pip'
- shell: bash
run: |
python -m pip install -r scripts/requirements.txt
python scripts/get_release_info.py
- uses: nearform-actions/[email protected]
with:
twitter-app-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
twitter-app-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
twitter-access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter-access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
message: ${{ env.BLOG_POST_TWITTER_NOTIFICATION_BODY}}
# TODO: discord notify