-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.15 KB
/
daily_post.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
42
43
44
45
46
47
# runs daily at 6:00 UTC and tweets the next part of the poem
name: Daily CI Post
on:
# manually triggered
workflow_dispatch:
schedule:
# daily at 6:00 UTC
- cron: "0 6 * * *"
jobs:
daily_post:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: current-position
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run daily_post.py
env:
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }}
CONSUMER_SECRET: ${{ secrets.CONSUMER_SECRET }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
ACCESS_TOKEN_SECRET: ${{ secrets.ACCESS_TOKEN_SECRET }}
run: |
python onegin_paste_bot.py
- name: Commit and push
run: |
git config --global user.email github-actions
git config --global user.name github-actions@github.com
git add .
git commit -m "Daily CI Post"
git push