Merge pull request #3892 from iptv-org/update-clean-action

Update "clean" action
pull/3894/head^2
Dum4G 3 years ago committed by GitHub
commit c3ecb93465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,6 +4,19 @@ on:
schedule: schedule:
- cron: '0 6 * * 0' - cron: '0 6 * * 0'
jobs: jobs:
create-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Create Branch
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'bot/remove-broken-links'
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true continue-on-error: true
@ -173,6 +186,8 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
ref: bot/remove-broken-links
- name: Install Dependencies - name: Install Dependencies
run: npm install run: npm install
- name: Remove Broken Links - name: Remove Broken Links
@ -182,14 +197,33 @@ jobs:
with: with:
name: channels name: channels
path: channels/${{ matrix.country }}.m3u path: channels/${{ matrix.country }}.m3u
pull-request: commit-changes:
needs: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with:
ref: bot/remove-broken-links
- name: Download Artifacts - name: Download Artifacts
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[Bot] Update playlists'
commit_user_name: iptv-bot
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
commit_author: 'iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>'
branch: bot/remove-broken-links
file_pattern: channels/*
pull-request:
runs-on: ubuntu-latest
needs: commit-changes
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: bot/remove-broken-links
- name: Generate Token - name: Generate Token
uses: tibdex/github-app-token@v1 uses: tibdex/github-app-token@v1
id: generate-token id: generate-token
@ -197,18 +231,18 @@ jobs:
app_id: ${{ secrets.APP_ID }} app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }} private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3 uses: repo-sync/pull-request@v2
with: with:
title: '[Bot] Remove broken links' source_branch: 'bot/remove-broken-links'
body: | destination_branch: 'master'
This pull request is created automatically by `clean` action. pr_title: '[Bot] Remove broken links'
pr_body: |
This pull request is created by [clean][1] workflow.
The script checks each link and removes only those that return a HTTP 404 code (Not Found). Also, the script ignores links with labels `[Geo-blocked]` and `[Not 24/7]` in the title. The script checks each link and removes only those that return a HTTP 404 code (Not Found). Also, the script ignores links with labels `[Geo-blocked]` and `[Not 24/7]` in the title.
**IMPORTANT:** Before merging all links should be checked manually to make sure that the response from the server has not changed. Working links should be marked as `[Not 24/7]` so that next time the script will not delete them. **IMPORTANT:** Before merging all links should be checked manually to make sure that the response from the server has not changed. Working links should be marked as `[Not 24/7]` so that next time the script will not delete them.
commit-message: '[Bot] Update playlists'
committer: GitHub <noreply@github.com> [1]: https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}
branch: bot/remove-broken-links pr_draft: true
delete-branch: true github_token: ${{ steps.generate-token.outputs.token }}
draft: true
token: ${{ steps.generate-token.outputs.token }}

Loading…
Cancel
Save