-
-
Notifications
You must be signed in to change notification settings - Fork 327
31 lines (31 loc) · 1.13 KB
/
update.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
name: update
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: create-app-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@v3
with:
token: ${{ steps.create-app-token.outputs.token }}
- run: npm install
- run: npm run db:update --silent >> $GITHUB_OUTPUT
id: issue-process
- name: Validate Changes
run: npm run db:validate
- name: Commit Changes
if: steps.issue-process.outputs.OUTPUT != 0
run: |
git config user.name "iptv-bot[bot]"
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
git add data/channels.csv
git commit -m "[Bot] Update channels.csv" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/database/actions/runs/${{ github.run_id }}) workflow." -m "${{ steps.issue-process.outputs.OUTPUT }}" --no-verify
git status
git push