You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
name: update
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 */6 * * *'
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- 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/checkout@v3
|
|
|
|
if: ${{ env.ACT }}
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
with:
|
|
|
|
token: ${{ steps.create-app-token.outputs.token }}
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
cache: 'npm'
|
|
|
|
- name: install dependencies
|
|
|
|
run: npm install
|
|
|
|
- name: load api data
|
|
|
|
run: npm run api:load
|
|
|
|
- name: validate playlists
|
|
|
|
run: |
|
|
|
|
npm run playlist:lint
|
|
|
|
npm run playlist:validate
|
|
|
|
- name: setup database
|
|
|
|
run: npm run db:create
|
|
|
|
- name: generate playlists
|
|
|
|
run: npm run playlist:generate
|
|
|
|
- name: generate streams.json
|
|
|
|
run: npm run api:generate
|
|
|
|
- name: update readme.md
|
|
|
|
run: npm run readme:update
|
|
|
|
- name: update git config
|
|
|
|
run: |
|
|
|
|
git config user.name "iptv-bot[bot]"
|
|
|
|
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
|
|
|
- name: deploy to github pages
|
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
run: GITHUB_TOKEN=${{ steps.create-app-token.outputs.token }} npm run deploy
|
|
|
|
- name: commit changes
|
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
run: |
|
|
|
|
git add README.md
|
|
|
|
git commit -m "[Bot] Update README.md" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
|
|
|
git status
|
|
|
|
git push
|