Skip to content

Send Notifications

Send Notifications #26

Workflow file for this run

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.11'
architecture: 'x64'
cache: 'pip'
- shell: bash
run: |
python -m pip install -r .github/scripts/requirements.txt
python .github/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