mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Update update.yml
This commit is contained in:
parent
d12fd1f6ce
commit
4a5a4f03c8
1 changed files with 30 additions and 20 deletions
50
.github/workflows/update.yml
vendored
50
.github/workflows/update.yml
vendored
|
@ -2,7 +2,7 @@ name: update
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */6 * * *'
|
- cron: '0 0 * * *'
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -10,7 +10,7 @@ jobs:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: tibdex/github-app-token@v1
|
- uses: getsentry/action-github-app-token@v2
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
id: create-app-token
|
id: create-app-token
|
||||||
with:
|
with:
|
||||||
|
@ -20,7 +20,12 @@ jobs:
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.create-app-token.outputs.token }}
|
token: ${{ steps.create-app-token.outputs.token }}
|
||||||
|
- name: setup git
|
||||||
|
run: |
|
||||||
|
git config user.name "iptv-bot[bot]"
|
||||||
|
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: 18
|
node-version: 18
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
@ -28,31 +33,36 @@ jobs:
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: load api data
|
- name: load api data
|
||||||
run: npm run api:load
|
run: npm run api:load
|
||||||
- name: validate playlists
|
- name: setup database
|
||||||
|
run: npm run db:create
|
||||||
|
- name: update internal playlists
|
||||||
|
run: npm run playlist:update --silent >> $GITHUB_OUTPUT
|
||||||
|
id: playlist-update
|
||||||
|
- name: check internal playlists
|
||||||
run: |
|
run: |
|
||||||
npm run playlist:lint
|
npm run playlist:lint
|
||||||
npm run playlist:validate
|
npm run playlist:validate
|
||||||
- name: setup database
|
- name: generate public playlists
|
||||||
run: npm run db:create
|
|
||||||
- name: generate playlists
|
|
||||||
run: npm run playlist:generate
|
run: npm run playlist:generate
|
||||||
- name: generate streams.json
|
- name: generate .api/streams.json
|
||||||
run: npm run api:generate
|
run: npm run api:generate
|
||||||
- name: update readme.md
|
- name: update readme.md
|
||||||
run: npm run readme:update
|
run: npm run readme:update
|
||||||
- name: commit changes
|
- run: git status
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
- name: commit changes to /streams
|
||||||
|
run: |
|
||||||
|
git add streams
|
||||||
|
git status
|
||||||
|
git commit -m "[Bot] Update /streams" -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." -m "${{ steps.playlist-update.outputs.OUTPUT }}" --no-verify
|
||||||
|
- name: commit changes to readme.md
|
||||||
|
run: |
|
||||||
|
git add README.md
|
||||||
|
git status
|
||||||
|
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
|
||||||
|
- name: push all changes to the repository
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
with:
|
run: git push
|
||||||
commit_message: "[Bot] Update README.md"
|
- name: deploy public playlists to github pages
|
||||||
branch: master
|
|
||||||
commit_options: '--no-verify'
|
|
||||||
file_pattern: README.md
|
|
||||||
repository: .
|
|
||||||
commit_user_name: iptv-bot[bot]
|
|
||||||
commit_user_email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
|
||||||
commit_author: iptv-bot[bot] <84861620+iptv-bot[bot]@users.noreply.github.com>
|
|
||||||
- name: deploy to github pages
|
|
||||||
uses: JamesIves/github-pages-deploy-action@4.1.1
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
with:
|
with:
|
||||||
|
@ -64,7 +74,7 @@ jobs:
|
||||||
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
git-config-email: 84861620+iptv-bot[bot]@users.noreply.github.com
|
||||||
commit-message: '[Bot] Deploy to GitHub Pages'
|
commit-message: '[Bot] Deploy to GitHub Pages'
|
||||||
clean: true
|
clean: true
|
||||||
- name: deploy to iptv-org/api
|
- name: move .api/streams.json to iptv-org/api
|
||||||
uses: JamesIves/github-pages-deploy-action@4.1.1
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue