-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.24 KB
/
Copy pathlobsters.yml
File metadata and controls
46 lines (40 loc) · 1.24 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
35
36
37
38
39
40
41
42
43
44
45
46
name: Lobsters to Telegram
on:
schedule:
- cron: "0 */2 * * *"
workflow_dispatch: {}
permissions:
contents: write
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Run pipeline
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
TELEGRAPH_ACCESS_TOKEN: ${{ secrets.TELEGRAPH_ACCESS_TOKEN }}
MAX_ITEMS_PER_RUN: "5"
run: |
uv run lobstersgram --sync-updates
uv run lobstersgram
- name: Commit state.json if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add state.json subscribers.json
for path in message_map.json bookmark.csv; do
if [ -f "$path" ]; then
git add "$path"
fi
done
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi
git commit -m "Update state, Telegram updates, message map and bookmarks"
git push