mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 09:30:06 -04:00
54 lines
1.7 KiB
YAML
54 lines
1.7 KiB
YAML
name: _load
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
site:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
APP_ID:
|
|
required: true
|
|
APP_PRIVATE_KEY:
|
|
required: true
|
|
jobs:
|
|
load:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: npm run api:load
|
|
- uses: tibdex/github-app-token@v1
|
|
if: ${{ !env.ACT }}
|
|
id: create-ffmpeg-token
|
|
with:
|
|
app_id: ${{ secrets.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
- uses: FedericoCarboni/setup-ffmpeg@v1
|
|
with:
|
|
token: ${{ steps.create-ffmpeg-token.outputs.token }}
|
|
- uses: actions/setup-node@v2
|
|
if: ${{ !env.ACT }}
|
|
with:
|
|
node-version: '14'
|
|
cache: 'npm'
|
|
- run: npm install
|
|
- run: CHANNELS_PATH=sites/${{inputs.site}}/*.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
|
|
- run: npm run programs:save
|
|
- run: npm run guides:update
|
|
- uses: tibdex/github-app-token@v1
|
|
if: ${{ !env.ACT }}
|
|
id: create-deploy-token
|
|
with:
|
|
app_id: ${{ secrets.APP_ID }}
|
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
|
- uses: JamesIves/github-pages-deploy-action@v4.3.3
|
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
|
with:
|
|
branch: gh-pages
|
|
folder: .gh-pages
|
|
token: ${{ steps.create-deploy-token.outputs.token }}
|
|
git-config-name: iptv-bot[bot]
|
|
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
|
commit-message: '[Bot] Update guide from ${{inputs.site}}'
|
|
clean: false
|
|
force: false
|