mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Temporary disable format on merge
This commit is contained in:
parent
4383c315ee
commit
b2c44a3373
2 changed files with 11 additions and 16 deletions
25
.github/workflows/format.yml
vendored
25
.github/workflows/format.yml
vendored
|
@ -1,11 +1,12 @@
|
||||||
name: format
|
name: format
|
||||||
on:
|
on:
|
||||||
pull_request:
|
workflow_dispatch:
|
||||||
types:
|
# pull_request:
|
||||||
- closed
|
# types:
|
||||||
|
# - closed
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
if: ${{ github.event.pull_request.merged == true }}
|
# if: ${{ github.event.pull_request.merged == true }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
@ -33,35 +34,29 @@ jobs:
|
||||||
with:
|
with:
|
||||||
files: streams/*.m3u
|
files: streams/*.m3u
|
||||||
- name: download data from api
|
- name: download data from api
|
||||||
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p temp/data
|
mkdir -p temp/data
|
||||||
curl -L -o temp/data/blocklist.json https://iptv-org.github.io/api/blocklist.json
|
curl -L -o temp/data/blocklist.json https://iptv-org.github.io/api/blocklist.json
|
||||||
curl -L -o temp/data/channels.json https://iptv-org.github.io/api/channels.json
|
curl -L -o temp/data/channels.json https://iptv-org.github.io/api/channels.json
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: format internal playlists
|
- name: format internal playlists
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
run: npm run playlist:format
|
||||||
run: npm run playlist:format -- ${{ steps.files.outputs.all_changed_files }}
|
|
||||||
- name: check internal playlists
|
- name: check internal playlists
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
|
npm run playlist:lint
|
||||||
npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}
|
npm run playlist:validate
|
||||||
- run: git status
|
- run: git status
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
- name: commit changes to /streams
|
- name: commit changes to /streams
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
git add streams
|
git add streams
|
||||||
git status
|
git status
|
||||||
git commit -m "[Bot] Format /streams" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [format](https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
git commit -m "[Bot] Format /streams" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [format](https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
||||||
- name: push all changes to the repository
|
- name: push all changes to the repository
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && steps.files.outputs.any_changed == 'true' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
run: git push
|
run: git push
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "iptv",
|
"name": "iptv",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"act:check": "act pull_request -W .github/workflows/check.yml",
|
"act:check": "act pull_request -W .github/workflows/check.yml",
|
||||||
"act:format": "act pull_request -W .github/workflows/format.yml -e act.json",
|
"act:format": "act workflow_dispatch -W .github/workflows/format.yml",
|
||||||
"act:update": "act workflow_dispatch -W .github/workflows/update.yml",
|
"act:update": "act workflow_dispatch -W .github/workflows/update.yml",
|
||||||
"api:load": "./scripts/commands/api/load.sh",
|
"api:load": "./scripts/commands/api/load.sh",
|
||||||
"api:generate": "npm run ts-node scripts/commands/api/generate.ts",
|
"api:generate": "npm run ts-node scripts/commands/api/generate.ts",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue