social media message scheduler #265
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: social media message scheduler | |
on: | |
schedule: | |
- cron: "0 9 * * 2,4,6" | |
jobs: | |
send-message: | |
defaults: | |
run: | |
working-directory: ./.github/workflows/social_media_message_scheduler | |
name: Send message | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install virtualenv | |
make install-deps | |
- name: send message | |
env: | |
consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
api_key: ${{ secrets.TWITTER_API_KEY }} | |
api_secret: ${{ secrets.TWITTER_API_SECRET }} | |
run_number: ${{ github.run_number }} | |
run: | | |
make run |