-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.48 KB
/
toot.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
name: Toot
on:
workflow_dispatch:
schedule:
- cron: '0 */8 * * *'
jobs:
tweet:
name: Toot
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3
- id: install
name: Install Python, pipenv and Pipfile packages
uses: palewire/install-python-pipenv-pipfile@v2
with:
python-version: 3.8
- id: execute
name: Execute Jupyter notebook
run: pipenv run jupyter execute tweet.ipynb
shell: bash
env:
MASTODON_CLIENT_KEY: ${{ secrets.MASTODON_CLIENT_KEY }}
MASTODON_CLIENT_SECRET: ${{ secrets.MASTODON_CLIENT_SECRET }}
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
- run: date > datestamp.txt
- id: commit
name: Commit
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git config pull.rebase false
git pull origin $GITHUB_REF
git add datestamp.txt
git commit -m "Ran a scrape" --author="palewire <[email protected]>" && git push || true
shell: bash