-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.09 KB
/
my-awesome-telegram.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
name: my-awesome-telegram
on:
# enable manual trigger
workflow_dispatch:
# schedule:
# # every 12 hours
# - cron: '0 0,12 * * *'
jobs:
telegram:
runs-on: ubuntu-latest
steps:
- name: Set variables
# ISO 8601 format (UTC)
run: |
echo "TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v4
- name: Sync Telegram
uses: my-awesome/actions/telegram-action@main
with:
data-path: "./data/telegram.json"
env:
TIMESTAMP: ${{ env.TIMESTAMP }}
# secrets from settings
TELEGRAM_API_TOKEN: ${{ secrets.TELEGRAM_API_TOKEN }}
TELEGRAM_FROM_ID: ${{ secrets.TELEGRAM_FROM_ID }}
- name: Update repository
uses: my-awesome/actions/gh-update-action@main
with:
user-email: "[email protected]"
user-name: "my-awesome-bot"
env:
TIMESTAMP: ${{ env.TIMESTAMP }}
# default secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}