mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Create update.yml
This commit is contained in:
parent
7cb449da06
commit
b538940e50
1 changed files with 49 additions and 0 deletions
49
.github/workflows/update.yml
vendored
Normal file
49
.github/workflows/update.yml
vendored
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
name: update
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *'
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: tibdex/github-app-token@v1.8.2
|
||||||
|
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 }}
|
||||||
|
with:
|
||||||
|
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
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: 'npm'
|
||||||
|
- name: install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: check *.channels.xml
|
||||||
|
run: |
|
||||||
|
npm run channels:lint
|
||||||
|
- name: generate .api/guides.json
|
||||||
|
run: npm run api:generate
|
||||||
|
- run: git status
|
||||||
|
- name: move .api/guides.json to iptv-org/api
|
||||||
|
uses: JamesIves/github-pages-deploy-action@4.1.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
|
Loading…
Add table
Add a link
Reference in a new issue