-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.11 KB
/
run.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
name: Run the bot
on:
workflow_dispatch:
push:
schedule:
- cron: "0 * * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install requirements
run: pip install -r requirements.txt
- name: Run script
env:
MASTODON_INSTANCE: ${{ vars.MASTODON_INSTANCE }}
MASTODON_USER: ${{ vars.MASTODON_USER }}
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
run: python best_of_mltshp.py
- name: Update links
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add links.log
timestamp=$(date -u)
git commit -m "Updated links: ${timestamp}" || exit 0
git push