Update auto-update.yml
This commit is contained in:
parent
3185c0e2cc
commit
e92e245cd8
|
@ -29,12 +29,12 @@ jobs:
|
||||||
path: scripts/data
|
path: scripts/data
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run db:create
|
- run: npm run db:create
|
||||||
- run: npm run db:matrix
|
|
||||||
id: create-matrix
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: database
|
name: database
|
||||||
path: scripts/database
|
path: scripts/database
|
||||||
|
- run: npm run db:matrix
|
||||||
|
id: create-matrix
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
||||||
load:
|
load:
|
||||||
|
@ -73,23 +73,28 @@ jobs:
|
||||||
- run: git config user.name 'iptv-bot[bot]'
|
- run: git config user.name 'iptv-bot[bot]'
|
||||||
- run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com'
|
- run: git config user.email '84861620+iptv-bot[bot]@users.noreply.github.com'
|
||||||
- run: git checkout -b ${{ steps.create-branch-name.outputs.branch_name }}
|
- run: git checkout -b ${{ steps.create-branch-name.outputs.branch_name }}
|
||||||
- run: curl -L -o scripts/data/codes.json https://iptv-org.github.io/epg/codes.json
|
- 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/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: database
|
|
||||||
path: scripts
|
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: data
|
name: data
|
||||||
path: scripts
|
path: scripts
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: database
|
||||||
|
path: scripts
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: scripts/logs
|
path: scripts
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run db:update
|
- run: npm run db:update
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
|
@ -97,23 +102,38 @@ jobs:
|
||||||
name: database
|
name: database
|
||||||
path: scripts/database
|
path: scripts/database
|
||||||
- run: npm run playlist:update
|
- run: npm run playlist:update
|
||||||
- run: git add channels/*
|
- run: git add streams/*
|
||||||
- run: git commit -m "[Bot] Update playlists"
|
- run: git commit -m "[Bot] Update streams"
|
||||||
- run: npm run playlist:generate
|
- run: npm run playlist:generate
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: scripts/logs
|
path: scripts/logs
|
||||||
|
- 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] Generate playlists'
|
||||||
|
- run: npm run db:export
|
||||||
|
- 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
|
||||||
- run: npm run readme:update
|
- run: npm run readme:update
|
||||||
- run: git add README.md
|
- run: git add README.md
|
||||||
- run: git commit -m "[Bot] Update README.md"
|
- run: git commit -m "[Bot] Update README.md"
|
||||||
- run: git push -u origin ${{ steps.create-branch-name.outputs.branch_name }}
|
- run: git push -u origin ${{ steps.create-branch-name.outputs.branch_name }}
|
||||||
- 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: repo-sync/pull-request@v2
|
- uses: repo-sync/pull-request@v2
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
id: pull-request
|
id: pull-request
|
||||||
|
@ -127,17 +147,8 @@ jobs:
|
||||||
|
|
||||||
[1]: https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}
|
[1]: https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}
|
||||||
- uses: juliangruber/merge-pull-request-action@v1
|
- uses: juliangruber/merge-pull-request-action@v1
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.PAT }}
|
github-token: ${{ secrets.PAT }}
|
||||||
number: ${{ steps.pull-request.outputs.pr_number }}
|
number: ${{ steps.pull-request.outputs.pr_number }}
|
||||||
method: squash
|
method: squash
|
||||||
- uses: JamesIves/github-pages-deploy-action@4.1.1
|
|
||||||
if: ${{ 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] Generate playlists'
|
|
||||||
|
|
Loading…
Reference in New Issue