From 4a85e0bc6a71e84311912bd32711adad182fa708 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Fri, 25 Feb 2022 16:43:37 +0300 Subject: [PATCH] Create _load.yml --- .github/workflows/_load.yml | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/_load.yml diff --git a/.github/workflows/_load.yml b/.github/workflows/_load.yml new file mode 100644 index 00000000..955d1d7a --- /dev/null +++ b/.github/workflows/_load.yml @@ -0,0 +1,38 @@ +name: load +on: + workflow_call: + inputs: + site: + required: true + type: string +jobs: + load: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - 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 + - uses: FedericoCarboni/setup-ffmpeg@v1 + - run: npm install + - run: CHANNELS_PATH=sites/${{inputs.site}}/*.channels.xml node scripts/commands/create-queue.js --max-clusters=1 --days=2 + - run: NODE_OPTIONS=--insecure-http-parser node scripts/commands/load-cluster.js --timeout=30000 --cluster-id=1 + - run: node scripts/commands/save-results.js + - run: node scripts/commands/update-guides.js + - 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: JamesIves/github-pages-deploy-action@4.1.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' + clean: false