Update auto-update.yml
This commit is contained in:
parent
dce06bfa8a
commit
a79edce7b1
|
@ -4,54 +4,64 @@ on:
|
|||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
jobs:
|
||||
remove-duplicates:
|
||||
create-branch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Create Branch
|
||||
run: git branch bot/auto-update && git push
|
||||
remove-duplicates:
|
||||
runs-on: ubuntu-latest
|
||||
needs: create-branch
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Remove Duplicates
|
||||
run: node scripts/remove-duplicates.js
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Commit Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
name: channels
|
||||
path: channels/
|
||||
commit_message: '[Bot] Removed duplicates'
|
||||
branch: bot/auto-update
|
||||
filter:
|
||||
runs-on: ubuntu-latest
|
||||
needs: remove-duplicates
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Filter Playlists
|
||||
run: node scripts/filter.js
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Commit Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
name: channels
|
||||
path: channels/
|
||||
commit_message: '[Bot] Filtered channels'
|
||||
branch: bot/auto-update
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
needs: filter
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Format Playlists
|
||||
run: node scripts/format.js
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
- name: Commit Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
name: channels
|
||||
path: channels/
|
||||
commit_message: '[Bot] Formated playlists'
|
||||
branch: bot/auto-update
|
||||
detect-resolution:
|
||||
runs-on: ubuntu-latest
|
||||
needs: format
|
||||
|
@ -224,8 +234,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Detect Resolution
|
||||
|
@ -235,14 +245,29 @@ jobs:
|
|||
with:
|
||||
name: channels
|
||||
path: channels/${{ matrix.country }}.m3u
|
||||
generate:
|
||||
commit-changes:
|
||||
runs-on: ubuntu-latest
|
||||
needs: detect-resolution
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
- name: Commit Changes
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: '[Bot] Detected resolution'
|
||||
branch: bot/auto-update
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
needs: commit-changes
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Generate Playlists
|
||||
|
@ -258,8 +283,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
ref: bot/auto-update
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
- name: Update README.md
|
||||
|
@ -275,15 +300,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Download /channels
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: channels
|
||||
path: channels/
|
||||
- name: Download README.md
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: README.md
|
||||
ref: bot/auto-update
|
||||
- name: Generate Token
|
||||
uses: tibdex/github-app-token@v1
|
||||
id: generate-token
|
||||
|
@ -297,7 +315,6 @@ jobs:
|
|||
title: '[Bot] Update playlists'
|
||||
body: |
|
||||
This pull request is created automatically by `auto-update` action.
|
||||
commit-message: '[Bot] Update playlists'
|
||||
committer: GitHub <noreply@github.com>
|
||||
branch: bot/auto-update
|
||||
delete-branch: true
|
||||
|
|
Loading…
Reference in New Issue