From 7a355883d783717062506a6f69863ccef5d53c11 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 19 Oct 2022 23:26:08 +0300 Subject: [PATCH 1/3] Upgrade to Node 16 https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ --- .github/workflows/_check.yml | 4 ++-- .github/workflows/_load.yml | 6 +++--- .github/workflows/_update-api.yml | 8 ++++---- .github/workflows/_update-readme.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/_check.yml b/.github/workflows/_check.yml index f0702cb6..076586ac 100644 --- a/.github/workflows/_check.yml +++ b/.github/workflows/_check.yml @@ -21,10 +21,10 @@ jobs: id: files with: files: sites/**/*.channels.xml - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} with: - node-version: '14' + node-version: 16 cache: 'npm' - name: validate if: steps.files.outputs.any_changed == 'true' diff --git a/.github/workflows/_load.yml b/.github/workflows/_load.yml index f188c115..a8b41fbe 100644 --- a/.github/workflows/_load.yml +++ b/.github/workflows/_load.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - run: npm run api:load - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 if: ${{ !env.ACT }} with: - node-version: '14' + node-version: 16 cache: 'npm' - run: npm install - run: CHANNELS_PATH=sites/${{inputs.site}}/*.channels.xml npm run queue:create -- --max-clusters=1 --days=2 @@ -32,7 +32,7 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: JamesIves/github-pages-deploy-action@v4.3.3 + - uses: JamesIves/github-pages-deploy-action@v4.4.1 if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} with: branch: gh-pages diff --git a/.github/workflows/_update-api.yml b/.github/workflows/_update-api.yml index a1a9f00c..39f7f5a6 100644 --- a/.github/workflows/_update-api.yml +++ b/.github/workflows/_update-api.yml @@ -7,11 +7,11 @@ jobs: update: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 if: ${{ !env.ACT }} with: - node-version: '14' + node-version: 16 cache: 'npm' - run: npm install - run: npm run api:update @@ -21,7 +21,7 @@ jobs: with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: JamesIves/github-pages-deploy-action@4.1.1 + - uses: JamesIves/github-pages-deploy-action@v4.4.1 if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} with: repository-name: iptv-org/api diff --git a/.github/workflows/_update-readme.yml b/.github/workflows/_update-readme.yml index a813b0cf..d7f0c86b 100644 --- a/.github/workflows/_update-readme.yml +++ b/.github/workflows/_update-readme.yml @@ -13,10 +13,10 @@ jobs: - run: git config user.name 'iptv-bot[bot]' - run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com' - run: git checkout -b ${{ steps.create-branch-name.outputs.branch_name }} - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 if: ${{ !env.ACT }} with: - node-version: '14' + node-version: 16 cache: 'npm' - run: npm install - run: npm run api:load From db327d4eb68bd2a27c5c68fc056abc547541401b Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 19 Oct 2022 23:31:58 +0300 Subject: [PATCH 2/3] Update _test.yml --- .github/workflows/_test.yml | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index df9c26e9..db596ece 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -1,33 +1,12 @@ name: _test on: workflow_dispatch: - pull_request: - types: [opened, synchronize, reopened, edited] -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true jobs: - test: + load: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - uses: tj-actions/changed-files@v19 - id: files - with: - files: sites/**/*.config.js - - name: Set changed sites name - if: ${{ steps.files.outputs.any_changed == 'true' }} - id: sites - run: | - declare out - for i in ${{ steps.files.outputs.all_changed_files }}; do - out+="$(echo $i | cut -d'/' -f 2) " - done - echo "::set-output name=all_changed_sites::$(echo $out)" - - name: test - if: steps.files.outputs.any_changed == 'true' - run: | - npm install - npm test -- ${{ steps.sites.outputs.all_changed_sites }} + - uses: actions/checkout@v3 + - run: npm run api:load + - run: npm install + - run: CHANNELS_PATH=sites/tvtv.us/tvtv.us_us.channels.xml npm run queue:create -- --max-clusters=1 --days=2 + - run: NODE_OPTIONS=--insecure-http-parser npm run cluster:load -- --timeout=30000 --cluster-id=1 \ No newline at end of file From 2ca5c9483d513c1061f3d822b5e196070a0073ea Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Wed, 19 Oct 2022 23:32:44 +0300 Subject: [PATCH 3/3] Remove set-output command https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- .github/workflows/_update-readme.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_update-readme.yml b/.github/workflows/_update-readme.yml index d7f0c86b..d50f6ff4 100644 --- a/.github/workflows/_update-readme.yml +++ b/.github/workflows/_update-readme.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: echo "::set-output name=branch_name::$(date +'bot/auto-update-%s')" + run: echo "branch_name=$(date +'bot/auto-update-%s')" >> $GITHUB_OUTPUT id: create-branch-name - run: git config user.name 'iptv-bot[bot]' - run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com'