-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.37 KB
/
tweet.yaml
File metadata and controls
34 lines (32 loc) · 1.37 KB
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
name: Daily Tweet
on: push
jobs:
tweet:
name: Tweet
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install Tweepy and Pillow
run: pip install --user tweepy pillow
- name: Install LaTeX and ImageMagick
run: sudo apt-get -y install texlive texlive-extra-utils texlive-latex-extra imagemagick
- name: Fix ImageMagick Policy
run: sudo sed -i 's/rights="none" pattern="PDF"/rights="read | write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
- name: Run Script
run: python3 twitter_bot/bot.py
env:
CONSUMER_TOKEN: ${{ secrets.CONSUMER_TOKEN }}
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
- name: Update Repository
run: |
git config --global user.name 'Actions Bot'
git config --global user.email 'action@github.com'
git commit -am "Automated post-tweet update"
git push