mirror of
https://github.com/iptv-org/iptv
synced 2026-05-10 03:27:16 -04:00
Update workflows
This commit is contained in:
13
.github/workflows/check.yml
vendored
13
.github/workflows/check.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: changed files
|
- name: Get list of changed files
|
||||||
id: files
|
id: files
|
||||||
run: |
|
run: |
|
||||||
git fetch origin master:master
|
git fetch origin master:master
|
||||||
@@ -23,14 +23,19 @@ jobs:
|
|||||||
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
||||||
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
if: ${{ !env.ACT && steps.files.outputs.any_changed == 'true' }}
|
if: steps.files.outputs.any_changed == 'true'
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: install dependencies
|
- name: Setup .npmrc for GitHub Packages
|
||||||
|
run: |
|
||||||
|
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
|
||||||
|
echo "@iptv-org:registry=https://npm.pkg.github.com/" >> .npmrc
|
||||||
|
echo "always-auth=true" >> .npmrc
|
||||||
|
- name: Install dependencies
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
if: steps.files.outputs.any_changed == 'true'
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: validate
|
- name: Validate changed files
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
if: steps.files.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
|
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
|
||||||
|
|||||||
91
.github/workflows/format.yml
vendored
91
.github/workflows/format.yml
vendored
@@ -1,10 +1,6 @@
|
|||||||
name: format
|
name: format
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# pull_request:
|
|
||||||
# types: [closed]
|
|
||||||
# branches:
|
|
||||||
# - master
|
|
||||||
# schedule:
|
# schedule:
|
||||||
# - cron: "0 12 * * *"
|
# - cron: "0 12 * * *"
|
||||||
jobs:
|
jobs:
|
||||||
@@ -28,19 +24,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 22
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: setup git
|
- name: Setup .npmrc for GitHub Packages
|
||||||
run: |
|
run: |
|
||||||
git config user.name "iptv-bot[bot]"
|
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
|
||||||
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
echo "@iptv-org:registry=https://npm.pkg.github.com/" >> .npmrc
|
||||||
- name: install dependencies
|
echo "always-auth=true" >> .npmrc
|
||||||
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: format internal playlists
|
- name: Format internal playlists
|
||||||
run: npm run playlist:format
|
run: npm run playlist:format
|
||||||
- name: check internal playlists
|
- name: Check internal playlists
|
||||||
run: |
|
run: |
|
||||||
npm run playlist:lint
|
npm run playlist:lint
|
||||||
npm run playlist:validate
|
npm run playlist:validate
|
||||||
- name: changed files
|
- name: Get list of changed files
|
||||||
id: files_after
|
id: files_after
|
||||||
run: |
|
run: |
|
||||||
ANY_CHANGED=false
|
ANY_CHANGED=false
|
||||||
@@ -50,82 +47,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
||||||
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
||||||
- name: git status
|
- name: Setup git
|
||||||
run: git status
|
|
||||||
- name: commit changes
|
|
||||||
if: steps.files_after.outputs.any_changed == 'true'
|
|
||||||
run: |
|
|
||||||
git add streams
|
|
||||||
git status
|
|
||||||
git commit -m "[Bot] Format /streams" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [format](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' && steps.files_after.outputs.any_changed == 'true' }}
|
|
||||||
run: git push
|
|
||||||
on_merge:
|
|
||||||
if: github.event.pull_request.merged == true
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- 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@v4
|
|
||||||
if: ${{ !env.ACT }}
|
|
||||||
with:
|
|
||||||
token: ${{ steps.create-app-token.outputs.token }}
|
|
||||||
- name: changed files
|
|
||||||
id: files
|
|
||||||
run: |
|
|
||||||
ANY_CHANGED=false
|
|
||||||
ALL_CHANGED_FILES=$(git diff --name-only master -- streams/ | tr '\n' ' ')
|
|
||||||
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
|
||||||
ANY_CHANGED=true
|
|
||||||
fi
|
|
||||||
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
if: ${{ steps.files.outputs.any_changed == 'true' }}
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
cache: 'npm'
|
|
||||||
- name: setup git
|
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
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"
|
||||||
- name: install dependencies
|
- name: Commit changes to /streams
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: npm install
|
|
||||||
- name: format internal playlists
|
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: npm run playlist:format -- ${{ steps.files.outputs.all_changed_files }}
|
|
||||||
- name: check internal playlists
|
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: |
|
|
||||||
npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }}
|
|
||||||
npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}
|
|
||||||
- name: git status
|
|
||||||
if: steps.files.outputs.any_changed == 'true'
|
|
||||||
run: git status
|
|
||||||
- name: changed files
|
|
||||||
id: files_after
|
|
||||||
run: |
|
|
||||||
ANY_CHANGED=false
|
|
||||||
ALL_CHANGED_FILES=$(git diff --name-only master -- streams/ | tr '\n' ' ')
|
|
||||||
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
|
||||||
ANY_CHANGED=true
|
|
||||||
fi
|
|
||||||
echo "all_changed_files=$ALL_CHANGED_FILES" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "any_changed=$ANY_CHANGED" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: commit changes
|
|
||||||
if: steps.files_after.outputs.any_changed == 'true'
|
if: steps.files_after.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
git add streams
|
git add streams
|
||||||
git status
|
git status
|
||||||
git commit -m "[Bot] Format /streams" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [format](https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
git commit -m "[Bot] Format /streams" -m "Committed by [iptv-bot](https://github.com/apps/iptv-bot) via [format](https://github.com/iptv-org/iptv/actions/runs/${{ github.run_id }}) workflow." --no-verify
|
||||||
- name: push all changes to the repository
|
- name: Push all changes to the repository
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && steps.files_after.outputs.any_changed == 'true' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && steps.files_after.outputs.any_changed == 'true' }}
|
||||||
run: git push
|
run: git push
|
||||||
1
.github/workflows/stale.yml
vendored
1
.github/workflows/stale.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
permissions:
|
permissions:
|
||||||
|
actions: write
|
||||||
issues: write
|
issues: write
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
|||||||
45
.github/workflows/update.yml
vendored
45
.github/workflows/update.yml
vendored
@@ -7,56 +7,59 @@ jobs:
|
|||||||
main:
|
main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: tibdex/github-app-token@v1.8.2
|
- uses: tibdex/github-app-token@v1.8.2
|
||||||
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/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
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
|
- uses: actions/setup-node@v4
|
||||||
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:
|
with:
|
||||||
node-version: 20
|
node-version: 22
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: install dependencies
|
- name: Setup .npmrc for GitHub Packages
|
||||||
|
run: |
|
||||||
|
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
|
||||||
|
echo "@iptv-org:registry=https://npm.pkg.github.com/" >> .npmrc
|
||||||
|
echo "always-auth=true" >> .npmrc
|
||||||
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: update internal playlists
|
- name: Update internal playlists
|
||||||
run: npm run playlist:update --silent >> $GITHUB_OUTPUT
|
run: npm run playlist:update --silent >> $GITHUB_OUTPUT
|
||||||
id: playlist-update
|
id: playlist-update
|
||||||
- name: check internal playlists
|
- name: Check internal playlists
|
||||||
run: |
|
run: |
|
||||||
npm run playlist:lint
|
npm run playlist:lint
|
||||||
npm run playlist:validate
|
npm run playlist:validate
|
||||||
- name: generate public playlists
|
- name: Generate public playlists
|
||||||
run: npm run playlist:generate
|
run: npm run playlist:generate
|
||||||
- name: generate .api/streams.json
|
- name: Generate .api/streams.json
|
||||||
run: npm run api:generate
|
run: npm run api:generate
|
||||||
- name: update readme
|
- name: Update readme
|
||||||
run: npm run readme:update
|
run: npm run readme:update
|
||||||
- run: git status
|
- name: Setup git
|
||||||
- name: commit changes to /streams
|
run: |
|
||||||
|
git config user.name "iptv-bot[bot]"
|
||||||
|
git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
|
||||||
|
- name: Commit changes to /streams
|
||||||
run: |
|
run: |
|
||||||
git add streams
|
git add streams
|
||||||
git status
|
git status
|
||||||
git commit --allow-empty -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
|
git commit --allow-empty -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 playlists.md
|
- name: Commit changes to PLAYLIST.md
|
||||||
run: |
|
run: |
|
||||||
git add PLAYLISTS.md
|
git add PLAYLISTS.md
|
||||||
git status
|
git status
|
||||||
git commit --allow-empty -m "[Bot] Update PLAYLISTS.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
|
git commit --allow-empty -m "[Bot] Update PLAYLISTS.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
|
- name: Push all changes to the repository
|
||||||
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
|
||||||
run: git push
|
run: git push
|
||||||
- name: deploy public playlists to github pages
|
- name: Deploy public playlists 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:
|
||||||
@@ -68,7 +71,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: move .api/streams.json 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:
|
||||||
|
|||||||
Reference in New Issue
Block a user