From a7da7bc779ac0e122cc7f3a648c600c654d2231f Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Thu, 27 Apr 2023 04:00:04 +0300 Subject: [PATCH] Remove .github/workflows --- .github/workflows/auto-update.yml | 163 ------------------------------ .github/workflows/check.yml | 36 ------- .github/workflows/test.yml | 9 -- 3 files changed, 208 deletions(-) delete mode 100644 .github/workflows/auto-update.yml delete mode 100644 .github/workflows/check.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml deleted file mode 100644 index 0815af77d..000000000 --- a/.github/workflows/auto-update.yml +++ /dev/null @@ -1,163 +0,0 @@ -name: auto-update -on: - workflow_dispatch: - schedule: - - cron: '0 0,12 * * *' -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - if: ${{ !env.ACT }} - with: - node-version: 16 - cache: 'npm' - - run: npm run api:load - - uses: actions/upload-artifact@v3 - with: - name: data - path: scripts/data - - run: npm install - - run: npm run db:create - - uses: actions/upload-artifact@v3 - with: - name: database - path: scripts/database - - run: npm run db:matrix --silent >> $GITHUB_OUTPUT - id: create-matrix - outputs: - matrix: ${{ steps.create-matrix.outputs.MATRIX }} - load: - runs-on: ubuntu-latest - needs: setup - continue-on-error: true - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.setup.outputs.MATRIX) }} - # matrix: - # cluster_id: [1] - steps: - - uses: actions/checkout@v3 - - name: Install ffmpeg - run: | - sudo rm -rf /var/lib/apt/lists/* - sudo apt-get clean - sudo apt-get update -y - sudo apt-get install -y ffmpeg - ffmpeg -version - ffprobe -version - - uses: actions/setup-node@v3 - if: ${{ !env.ACT }} - with: - node-version: 16 - - uses: actions/download-artifact@v3 - with: - name: database - path: scripts/database - - run: npm install - - run: npm run cluster:load -- --cluster-id=${{ matrix.cluster_id }} - - uses: actions/upload-artifact@v3 - with: - name: logs - path: scripts/logs - update: - runs-on: ubuntu-latest - needs: load - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - 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' - - run: git checkout -b ${{ steps.create-branch-name.outputs.BRANCH_NAME }} - - uses: tibdex/github-app-token@v1 - if: ${{ !env.ACT }} - id: create-app-token - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: actions/setup-node@v3 - if: ${{ !env.ACT }} - with: - node-version: 16 - - uses: actions/download-artifact@v3 - with: - name: data - path: scripts/data - - uses: actions/download-artifact@v3 - with: - name: database - path: scripts/database - - uses: actions/download-artifact@v3 - with: - name: logs - path: scripts/logs - - run: npm install - - run: npm run db:update - - run: npm run db:clear - - run: npm run db:export - - uses: actions/upload-artifact@v3 - with: - name: api - path: .api - - run: npm run playlist:update - - run: npm run playlist:generate - - uses: actions/upload-artifact@v3 - with: - name: logs - path: scripts/logs - - run: npm run readme:update - - name: Commit Changes - if: ${{ !env.ACT }} - run: | - git add streams/* - git commit -m "[Bot] Update /streams" - git add README.md - git commit -m "[Bot] Update README.md" - git status - git push -u origin ${{ steps.create-branch-name.outputs.BRANCH_NAME }} - - name: Deploy to gh-pages - uses: JamesIves/github-pages-deploy-action@v4.4.1 - if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} - with: - branch: gh-pages - folder: .gh-pages - token: ${{ steps.create-app-token.outputs.token }} - git-config-name: iptv-bot[bot] - git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com - commit-message: '[Bot] Deploy to GitHub Pages' - single-commit: true - clean: true - - name: Deploy to iptv-org/api - uses: JamesIves/github-pages-deploy-action@v4.4.1 - if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} - with: - repository-name: iptv-org/api - branch: gh-pages - folder: .api - token: ${{ steps.create-app-token.outputs.token }} - git-config-name: iptv-bot[bot] - git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com - commit-message: '[Bot] Deploy to iptv-org/api' - clean: false - - uses: repo-sync/pull-request@v2.9 - if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} - id: pull-request - with: - github_token: ${{ steps.create-app-token.outputs.token }} - source_branch: ${{ steps.create-branch-name.outputs.BRANCH_NAME }} - destination_branch: 'master' - pr_title: '[Bot] Daily update' - pr_body: | - This pull request is created by [auto-update][1] workflow. - - [1]: https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }} - - uses: juliangruber/merge-pull-request-action@v1 - if: ${{ !env.ACT && github.ref == 'refs/heads/master' }} - with: - github-token: ${{ secrets.PAT }} - number: ${{ steps.pull-request.outputs.pr_number }} - method: squash diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index 99970f479..000000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: check -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: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - uses: tj-actions/changed-files@v35 - id: files - with: - files: streams/*.m3u - - uses: actions/setup-node@v3 - if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }} - with: - node-version: 16 - cache: 'npm' - - name: download data from api - if: steps.files.outputs.any_changed == 'true' - 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/channels.json https://iptv-org.github.io/api/channels.json - - name: validate - if: steps.files.outputs.any_changed == 'true' - run: | - npm install - npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }} - npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index e5d16a576..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: test -on: - workflow_dispatch: -jobs: - main: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - run: echo "Hello World" \ No newline at end of file