Update auto-update.yml

This commit is contained in:
Aleksandr Statciuk 2022-01-31 04:47:44 +03:00
parent 036fdf537d
commit d5da17b664

View file

@ -8,13 +8,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: mkdir -p scripts/data
- run: curl -L -o scripts/data/channels.json https://iptv-org.github.io/api/channels.json
- run: curl -L -o scripts/data/countries.json https://iptv-org.github.io/api/countries.json
- run: curl -L -o scripts/data/subdivisions.json https://iptv-org.github.io/api/subdivisions.json
- uses: actions/upload-artifact@v2
with:
name: data
path: scripts/data
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
if: ${{ !env.ACT }} if: ${{ !env.ACT }}
with: with:
node-version: '14' node-version: '14'
cache: 'npm' cache: 'npm'
- run: npm install - run: npm install
- run: node scripts/commands/create-database.js - run: node scripts/commands/create-queue.js --max-clusters=30000 --days=2
- run: node scripts/commands/create-matrix.js - run: node scripts/commands/create-matrix.js
id: create-matrix id: create-matrix
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
@ -29,9 +37,9 @@ jobs:
continue-on-error: true continue-on-error: true
strategy: strategy:
fail-fast: false fail-fast: false
matrix: ${{ fromJson(needs.setup.outputs.matrix) }} # matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
# matrix: matrix:
# cluster_id: [1] cluster_id: [1]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
@ -44,7 +52,7 @@ jobs:
with: with:
node-version: '14' node-version: '14'
- run: npm install - run: npm install
- run: NODE_OPTIONS=--insecure-http-parser node scripts/commands/load-cluster.js --days=2 --timeout=30000 --cluster-id=${{ matrix.cluster_id }} - run: NODE_OPTIONS=--insecure-http-parser node scripts/commands/load-cluster.js --timeout=30000 --cluster-id=${{ matrix.cluster_id }}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: logs name: logs
@ -59,11 +67,14 @@ jobs:
- run: git config user.name 'iptv-bot[bot]' - run: git config user.name 'iptv-bot[bot]'
- run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com' - run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com'
- run: git checkout -b ${{ steps.create-branch-name.outputs.branch_name }} - run: git checkout -b ${{ steps.create-branch-name.outputs.branch_name }}
- run: curl -L -o scripts/data/codes.json https://iptv-org.github.io/epg/codes.json
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: database name: database
path: scripts/database path: scripts/database
- uses: actions/download-artifact@v2
with:
name: data
path: scripts/data
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
name: logs name: logs
@ -78,8 +89,8 @@ jobs:
with: with:
name: database name: database
path: scripts/database path: scripts/database
- run: NODE_OPTIONS="--max-old-space-size=4096" node scripts/commands/update-api.js
- run: NODE_OPTIONS="--max-old-space-size=4096" node scripts/commands/update-guides.js - run: NODE_OPTIONS="--max-old-space-size=4096" node scripts/commands/update-guides.js
- run: NODE_OPTIONS="--max-old-space-size=4096" node scripts/commands/update-api.js
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: logs name: logs