Update auto-update.yml
This commit is contained in:
parent
47a49b0023
commit
93f8d3e8b2
52
.github/workflows/auto-update.yml
vendored
52
.github/workflows/auto-update.yml
vendored
|
@ -7,50 +7,50 @@ jobs:
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: 16
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm run api:load
|
- run: npm run api:load
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: data
|
name: data
|
||||||
path: scripts/data
|
path: scripts/data
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run db:create
|
- run: npm run db:create
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: database
|
name: database
|
||||||
path: scripts/database
|
path: scripts/database
|
||||||
- run: npm run db:matrix
|
- run: npm run db:matrix >> $GITHUB_OUTPUT
|
||||||
id: create-matrix
|
id: create-matrix
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.create-matrix.outputs.matrix }}
|
matrix: ${{ steps.create-matrix.outputs.MATRIX }}
|
||||||
load:
|
load:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: ${{ fromJson(needs.setup.outputs.matrix) }}
|
matrix: ${{ fromJson(needs.setup.outputs.MATRIX) }}
|
||||||
# matrix:
|
# matrix:
|
||||||
# cluster_id: [1]
|
# cluster_id: [1]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: FedericoCarboni/setup-ffmpeg@v1
|
- uses: FedericoCarboni/setup-ffmpeg@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: 16
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: database
|
name: database
|
||||||
path: scripts/database
|
path: scripts/database
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run cluster:load -- --cluster-id=${{ matrix.cluster_id }}
|
- run: npm run cluster:load -- --cluster-id=${{ matrix.cluster_id }}
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: scripts/logs
|
path: scripts/logs
|
||||||
|
@ -58,33 +58,33 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: load
|
needs: load
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: echo "::set-output name=branch_name::$(date +'bot/auto-update-%s')"
|
- run: echo "BRANCH_NAME=$(date +'bot/auto-update-%s')" >> $GITHUB_OUTPUT
|
||||||
id: create-branch-name
|
id: create-branch-name
|
||||||
- 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 }}
|
||||||
- uses: tibdex/github-app-token@v1
|
- uses: tibdex/github-app-token@v1
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
id: create-app-token
|
id: create-app-token
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.APP_ID }}
|
app_id: ${{ secrets.APP_ID }}
|
||||||
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
if: ${{ !env.ACT }}
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: 16
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: data
|
name: data
|
||||||
path: scripts/data
|
path: scripts/data
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: database
|
name: database
|
||||||
path: scripts/database
|
path: scripts/database
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: scripts/logs
|
path: scripts/logs
|
||||||
|
@ -92,13 +92,13 @@ jobs:
|
||||||
- run: npm run db:update
|
- run: npm run db:update
|
||||||
- run: npm run db:clear
|
- run: npm run db:clear
|
||||||
- run: npm run db:export
|
- run: npm run db:export
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: api
|
name: api
|
||||||
path: .api
|
path: .api
|
||||||
- run: npm run playlist:update
|
- run: npm run playlist:update
|
||||||
- run: npm run playlist:generate
|
- run: npm run playlist:generate
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: logs
|
name: logs
|
||||||
path: scripts/logs
|
path: scripts/logs
|
||||||
|
@ -111,7 +111,7 @@ jobs:
|
||||||
git add README.md
|
git add README.md
|
||||||
git commit -m "[Bot] Update README.md"
|
git commit -m "[Bot] Update README.md"
|
||||||
git status
|
git status
|
||||||
git push -u origin ${{ steps.create-branch-name.outputs.branch_name }}
|
git push -u origin ${{ steps.create-branch-name.outputs.BRANCH_NAME }}
|
||||||
- name: Deploy to gh-pages
|
- name: Deploy to gh-pages
|
||||||
uses: JamesIves/github-pages-deploy-action@v4.2.5
|
uses: JamesIves/github-pages-deploy-action@v4.2.5
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
|
@ -141,7 +141,7 @@ jobs:
|
||||||
id: pull-request
|
id: pull-request
|
||||||
with:
|
with:
|
||||||
github_token: ${{ steps.create-app-token.outputs.token }}
|
github_token: ${{ steps.create-app-token.outputs.token }}
|
||||||
source_branch: ${{ steps.create-branch-name.outputs.branch_name }}
|
source_branch: ${{ steps.create-branch-name.outputs.BRANCH_NAME }}
|
||||||
destination_branch: 'master'
|
destination_branch: 'master'
|
||||||
pr_title: '[Bot] Daily update'
|
pr_title: '[Bot] Daily update'
|
||||||
pr_body: |
|
pr_body: |
|
||||||
|
|
Loading…
Reference in a new issue