34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: cleanup
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
cleanup:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: npm install
|
|
- run: node scripts/commands/create-database.js
|
|
- run: node scripts/commands/cleanup-database.js
|
|
- run: node scripts/commands/update-playlists.js
|
|
- uses: tibdex/github-app-token@v1
|
|
if: ${{ !env.ACT }}
|
|
id: create-app-token
|
|
with:
|
|
app_id: ${{ secrets.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
- uses: peter-evans/create-pull-request@v3
|
|
if: ${{ github.ref == 'refs/heads/master' }}
|
|
token: ${{ steps.create-app-token.outputs.token }}
|
|
commit-message: '[Bot] Update playlists'
|
|
committer: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
|
author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
|
branch: bot/cleanup
|
|
branch-suffix: timestamp
|
|
delete-branch: true
|
|
base: master
|
|
title: '[Bot] Remove broken links'
|
|
body: |
|
|
This pull request is created by [cleanup][1] workflow.
|
|
|
|
[1]: https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}
|