From 4ec6082019475f7dd8bea4a84d0ce7f83a067378 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 31 Jan 2022 20:05:22 +0300 Subject: [PATCH] Update auto-update.yml --- .github/workflows/auto-update.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index cd0fdec8..bb4f84bc 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -8,10 +8,15 @@ jobs: runs-on: ubuntu-latest steps: - 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 + - name: Delete .artifacts/ folder + if: ${{ env.ACT }} + run: rm -rf .artifacts/ + - name: Download data from API + run: | + mkdir -p scripts/data + 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/subdivisions.json https://iptv-org.github.io/api/subdivisions.json - uses: actions/upload-artifact@v2 with: name: data @@ -22,7 +27,7 @@ jobs: node-version: '14' cache: 'npm' - run: npm install - - run: node scripts/commands/create-queue.js --max-clusters=30000 --days=2 + - run: node scripts/commands/create-queue.js --max-clusters=256 --days=2 - run: node scripts/commands/create-matrix.js id: create-matrix - uses: actions/upload-artifact@v2 @@ -37,9 +42,9 @@ jobs: continue-on-error: true strategy: fail-fast: false - # matrix: ${{ fromJson(needs.setup.outputs.matrix) }} - matrix: - cluster_id: [1] + matrix: ${{ fromJson(needs.setup.outputs.matrix) }} + # matrix: + # cluster_id: [1] steps: - uses: actions/checkout@v2 - uses: actions/download-artifact@v2 @@ -104,9 +109,12 @@ jobs: name: programs.json path: .gh-pages/api/programs.json - run: node scripts/commands/update-readme.js - - run: git add README.md - - run: git commit -m "[Bot] Update README.md" - - run: git push -u origin ${{ steps.create-branch-name.outputs.branch_name }} + - name: Commit changes in README.md + if: ${{ !env.ACT }} + run: | + git add README.md + git commit -m "[Bot] Update README.md" + git push -u origin ${{ steps.create-branch-name.outputs.branch_name }} - uses: tibdex/github-app-token@v1 if: ${{ !env.ACT }} id: create-app-token