-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 900 Bytes
/
update.yml
File metadata and controls
40 lines (32 loc) · 900 Bytes
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: Update Subscriptions
on:
schedule:
- cron: '17 * * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Fetch and merge sources
run: npx tsx src/fetch.ts
- name: Generate output
run: npx tsx src/output.ts
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add output/ data/
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "$(date -u '+%Y-%m-%d %H:%M') update"
git push
fi