Update auto-update.yml
This commit is contained in:
parent
5f0f8a9427
commit
6f7f595e15
|
@ -15,7 +15,7 @@ jobs:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
- name: Set Branch Name
|
- name: Set Branch Name
|
||||||
id: set-branch-name
|
id: set-branch-name
|
||||||
run: echo "::set-output name=branch_name::bot/auto-update-$(date +'%Y%m%d%H%M%S')"
|
run: echo "::set-output name=branch_name::$(date +'bot/auto-update-%Y%m%d%H%M00')"
|
||||||
- name: Create Branch
|
- name: Create Branch
|
||||||
uses: peterjgrainger/action-create-branch@v2.0.1
|
uses: peterjgrainger/action-create-branch@v2.0.1
|
||||||
env:
|
env:
|
||||||
|
@ -28,14 +28,10 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Display Branch Name
|
|
||||||
run: echo ${{ needs.create-branch.outputs.branch_name }}
|
|
||||||
- name: Exit
|
|
||||||
run: exit 1
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -48,7 +44,7 @@ jobs:
|
||||||
run: node scripts/create-matrix.js
|
run: node scripts/create-matrix.js
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: create-matrix
|
needs: [create-matrix, create-branch]
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -57,7 +53,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup FFmpeg
|
- name: Setup FFmpeg
|
||||||
uses: FedericoCarboni/setup-ffmpeg@v1
|
uses: FedericoCarboni/setup-ffmpeg@v1
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
|
@ -68,7 +64,7 @@ jobs:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Format Playlists
|
- name: Format Playlists
|
||||||
run: node scripts/format.js --country=${{ matrix.country }} --debug
|
run: node scripts/format.js --country=${{ matrix.country }} --debug --offline
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -76,12 +72,12 @@ jobs:
|
||||||
path: channels/${{ matrix.country }}.m3u
|
path: channels/${{ matrix.country }}.m3u
|
||||||
commit-changes:
|
commit-changes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: format
|
needs: [format, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -94,16 +90,16 @@ jobs:
|
||||||
commit_user_name: iptv-bot
|
commit_user_name: iptv-bot
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/auto-update
|
branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
file_pattern: channels/*
|
file_pattern: channels/*
|
||||||
remove-duplicates:
|
remove-duplicates:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: commit-changes
|
needs: [commit-changes, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -120,16 +116,16 @@ jobs:
|
||||||
commit_user_name: iptv-bot
|
commit_user_name: iptv-bot
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/auto-update
|
branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
file_pattern: channels/*
|
file_pattern: channels/*
|
||||||
sort:
|
sort:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: remove-duplicates
|
needs: [remove-duplicates, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -146,16 +142,16 @@ jobs:
|
||||||
commit_user_name: iptv-bot
|
commit_user_name: iptv-bot
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/auto-update
|
branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
file_pattern: channels/*
|
file_pattern: channels/*
|
||||||
filter:
|
filter:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: sort
|
needs: [sort, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -172,16 +168,16 @@ jobs:
|
||||||
commit_user_name: iptv-bot
|
commit_user_name: iptv-bot
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/auto-update
|
branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
file_pattern: channels/*
|
file_pattern: channels/*
|
||||||
generate:
|
generate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: filter
|
needs: [filter, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -198,12 +194,12 @@ jobs:
|
||||||
path: .gh-pages/
|
path: .gh-pages/
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: generate
|
needs: [generate, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Download Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
@ -227,12 +223,12 @@ jobs:
|
||||||
commit-message: '[Bot] Deploy to GitHub Pages'
|
commit-message: '[Bot] Deploy to GitHub Pages'
|
||||||
update-readme:
|
update-readme:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: generate
|
needs: [generate, create-branch]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -249,17 +245,17 @@ jobs:
|
||||||
commit_user_name: iptv-bot
|
commit_user_name: iptv-bot
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
|
||||||
branch: bot/auto-update
|
branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
file_pattern: README.md
|
file_pattern: README.md
|
||||||
pull-request:
|
pull-request:
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
needs: update-readme
|
needs: [update-readme, create-branch]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: bot/auto-update
|
ref: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
- name: Generate Token
|
- name: Generate Token
|
||||||
uses: tibdex/github-app-token@v1
|
uses: tibdex/github-app-token@v1
|
||||||
id: generate-token
|
id: generate-token
|
||||||
|
@ -270,7 +266,7 @@ jobs:
|
||||||
id: pr
|
id: pr
|
||||||
uses: repo-sync/pull-request@v2
|
uses: repo-sync/pull-request@v2
|
||||||
with:
|
with:
|
||||||
source_branch: 'bot/auto-update'
|
source_branch: ${{ needs.create-branch.outputs.branch_name }}
|
||||||
destination_branch: 'master'
|
destination_branch: 'master'
|
||||||
pr_title: '[Bot] Update playlists'
|
pr_title: '[Bot] Update playlists'
|
||||||
pr_body: |
|
pr_body: |
|
||||||
|
|
Loading…
Reference in New Issue