From b92e7414c01a1f12131636b17887659e7248d0af Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 23 Mar 2022 20:04:49 +0300 Subject: [PATCH 1/3] Create load.sh --- scripts/commands/api/load.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/commands/api/load.sh diff --git a/scripts/commands/api/load.sh b/scripts/commands/api/load.sh new file mode 100755 index 0000000000..0364dccf21 --- /dev/null +++ b/scripts/commands/api/load.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +mkdir -p scripts/data +curl -L -o scripts/data/blocklist.json https://iptv-org.github.io/api/blocklist.json +curl -L -o scripts/data/categories.json https://iptv-org.github.io/api/categories.json +curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json +curl -L -o scripts/data/countries.json https://iptv-org.github.io/api/countries.json +curl -L -o scripts/data/guides.json https://iptv-org.github.io/api/guides.json +curl -L -o scripts/data/languages.json https://iptv-org.github.io/api/languages.json +curl -L -o scripts/data/regions.json https://iptv-org.github.io/api/regions.json +curl -L -o scripts/data/subdivisions.json https://iptv-org.github.io/api/subdivisions.json \ No newline at end of file From 02c4d5ad80975062d71ea26988c9c886ab0db245 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 23 Mar 2022 20:04:57 +0300 Subject: [PATCH 2/3] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 4e489ee78f..16d82a5067 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "scripts": { "act:auto-update": "act workflow_dispatch -W .github/workflows/auto-update.yml --artifact-server-path=.artifacts", "act:check": "act pull_request -W .github/workflows/check.yml", + "api:load": "./scripts/commands/api/load.sh", "db:create": "node scripts/commands/database/create.js", "db:matrix": "node scripts/commands/database/matrix.js", "db:update": "node scripts/commands/database/update.js", From 52c1b111608a3aca56a5663988a47bf11cd93037 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 23 Mar 2022 20:05:00 +0300 Subject: [PATCH 3/3] Update auto-update.yml --- .github/workflows/auto-update.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 27f84839a2..3c5db63308 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -13,17 +13,8 @@ jobs: with: node-version: '14' cache: 'npm' - - name: Download data from API - run: | - mkdir -p scripts/data - curl -L -o scripts/data/blocklist.json https://iptv-org.github.io/api/blocklist.json - curl -L -o scripts/data/categories.json https://iptv-org.github.io/api/categories.json - curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json - curl -L -o scripts/data/countries.json https://iptv-org.github.io/api/countries.json - curl -L -o scripts/data/guides.json https://iptv-org.github.io/api/guides.json - curl -L -o scripts/data/languages.json https://iptv-org.github.io/api/languages.json - curl -L -o scripts/data/regions.json https://iptv-org.github.io/api/regions.json - curl -L -o scripts/data/subdivisions.json https://iptv-org.github.io/api/subdivisions.json + # - run: sudo chmod 755 'scripts/commands/api/load.sh' + - run: npm run api:load - uses: actions/upload-artifact@v2 with: name: data