mirror of
https://github.com/iptv-org/database.git
synced 2024-11-25 20:11:27 -05:00
Update update.yml
This commit is contained in:
parent
da0bccd291
commit
a432f062a9
1 changed files with 25 additions and 10 deletions
35
.github/workflows/update.yml
vendored
35
.github/workflows/update.yml
vendored
|
@ -7,25 +7,40 @@ jobs:
|
||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: tibdex/github-app-token@v1
|
- uses: actions/checkout@v3
|
||||||
|
- uses: tibdex/github-app-token@v1.8.2
|
||||||
|
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/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.create-app-token.outputs.token }}
|
token: ${{ steps.create-app-token.outputs.token }}
|
||||||
- run: npm install
|
- uses: actions/setup-node@v3
|
||||||
- run: npm run db:update --silent >> $GITHUB_OUTPUT
|
if: ${{ !env.ACT }}
|
||||||
id: issue-process
|
with:
|
||||||
- name: Validate Changes
|
node-version: 18
|
||||||
|
cache: 'npm'
|
||||||
|
- name: install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: update data
|
||||||
|
id: db-update
|
||||||
|
run: npm run db:update --silent >> $GITHUB_OUTPUT
|
||||||
|
- name: validate changes
|
||||||
run: npm run db:validate
|
run: npm run db:validate
|
||||||
- name: Commit Changes
|
- name: setup git
|
||||||
if: steps.issue-process.outputs.OUTPUT != 0
|
|
||||||
run: |
|
run: |
|
||||||
git config user.name "iptv-bot[bot]"
|
git config user.name "iptv-bot[bot]"
|
||||||
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
||||||
git add data/channels.csv
|
- run: git status
|
||||||
git commit -m "[Bot] Update channels.csv" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/database/actions/runs/${{ github.run_id }}) workflow." -m "${{ steps.issue-process.outputs.OUTPUT }}" --no-verify
|
- name: commit changes
|
||||||
|
if: steps.db-update.outputs.OUTPUT != 0
|
||||||
|
run: |
|
||||||
|
git add data/*.csv
|
||||||
git status
|
git status
|
||||||
git push
|
git commit -m "[Bot] Update data" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [update](https://github.com/iptv-org/database/actions/runs/${{ github.run_id }}) workflow." -m "${{ steps.db-update.outputs.OUTPUT }}" --no-verify
|
||||||
|
- name: push all changes to the repository
|
||||||
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
|
run: git push
|
||||||
|
|
Loading…
Reference in a new issue