iptv-database/.github/workflows/update.yml

29 lines
1.1 KiB
YAML
Raw Normal View History

2023-04-08 20:39:08 -04:00
name: update
on:
workflow_dispatch:
2023-04-11 17:50:43 -04:00
schedule:
- cron: '0 0 * * *'
2023-04-08 20:39:08 -04:00
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: tibdex/github-app-token@v1
id: create-app-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- run: npm install
- run: GITHUB_TOKEN=${{ steps.create-app-token.outputs.token }} npm run db:update --silent >> $GITHUB_OUTPUT
id: issue-process
2023-05-24 16:09:52 -04:00
- name: Validate Changes
run: npm run db:validate -- data/channels.csv
2023-04-08 20:39:08 -04:00
- name: Commit Changes
run: |
git config user.name ${{ github.actor }}
git config user.email '${{ github.actor }}@users.noreply.github.com'
git add data/channels.csv
2023-05-24 16:09:52 -04:00
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
2023-04-08 20:39:08 -04:00
git status
2023-05-24 16:09:52 -04:00
git push