iptv-org/iptv

4 workflows · maturity 33% · 1 patterns · GitHub ↗

Security 21.25/100

Practices

○ Matrix✓ Permissions○ Security scan○ AI review○ Cache✓ Concurrency○ Reusable workflows

Detected patterns

Security dimensions

permissions
6.3
security scan
0
supply chain
0
secret handling
15
harden runner
0

Workflows (4)

check .github/workflows/check.yml
Triggers
workflow_dispatch, pull_request
Runs on
ubuntu-latest
Jobs
check
Commands
  • git fetch origin master:master ANY_CHANGED=false ALL_CHANGED_FILES=$(git diff --diff-filter=ACMRT --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"
  • npm install
  • npm run playlist:lint -- ${{ steps.files.outputs.all_changed_files }} npm run playlist:validate -- ${{ steps.files.outputs.all_changed_files }}
View raw YAML
name: check
on:
  workflow_dispatch:
  pull_request:
    types: [opened, synchronize, reopened]
concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Get list of changed files
        id: files
        run: |
          git fetch origin master:master
          ANY_CHANGED=false
          ALL_CHANGED_FILES=$(git diff --diff-filter=ACMRT --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@v6
        if: steps.files.outputs.any_changed == 'true'
        with:
          node-version: 22
          cache: 'npm'
      - name: Install dependencies
        if: steps.files.outputs.any_changed == 'true'
        run: npm install
      - name: Validate changed files
        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 }}
format .github/workflows/format.yml
Triggers
workflow_dispatch
Runs on
ubuntu-latest
Jobs
main
Actions
tibdex/github-app-token
Commands
  • npm install
  • npm run playlist:format
  • npm run playlist:lint npm run playlist:validate
  • ANY_CHANGED=false ALL_CHANGED_FILES=$(git diff --diff-filter=ACMRT --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"
  • git config user.name "iptv-bot[bot]" git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
  • 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
  • git push
View raw YAML
name: format
on:
  workflow_dispatch:
  # schedule:
  #   - cron: "0 12 * * *"
jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - 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@v6
        if: ${{ !env.ACT }}
        with:
          token: ${{ steps.create-app-token.outputs.token }}
      - uses: actions/setup-node@v6
        with:
          node-version: 22
          cache: 'npm'
      - name: Install dependencies
        run: npm install
      - name: Format internal playlists
        run: npm run playlist:format
      - name: Check internal playlists
        run: |
          npm run playlist:lint
          npm run playlist:validate
      - name: Get list of changed files
        id: files_after
        run: |
          ANY_CHANGED=false
          ALL_CHANGED_FILES=$(git diff --diff-filter=ACMRT --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: Setup git
        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
        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
stale perms .github/workflows/stale.yml
Triggers
workflow_dispatch, schedule
Runs on
ubuntu-latest
Jobs
stale
Actions
tibdex/github-app-token, actions/stale
View raw YAML
name: stale
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'
permissions:
  actions: write
  issues: write
jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: tibdex/github-app-token@v1.8.2
        id: create-app-token
        with:
          app_id: ${{ secrets.APP_ID }}
          private_key: ${{ secrets.APP_PRIVATE_KEY }}
      - uses: actions/stale@v10
        with:
          repo-token: ${{ steps.create-app-token.outputs.token }}
          days-before-stale: 180
          days-before-close: 7
          operations-per-run: 500
          stale-issue-label: 'stale'
          any-of-issue-labels: 'channel search'
          close-issue-message: 'This request has been closed because it has been inactive for more than 180 days.'
update .github/workflows/update.yml
Triggers
workflow_dispatch, schedule
Runs on
ubuntu-latest
Jobs
main
Actions
tibdex/github-app-token, JamesIves/github-pages-deploy-action, JamesIves/github-pages-deploy-action
Commands
  • npm install
  • npm run playlist:update --silent >> $GITHUB_OUTPUT
  • npm run playlist:lint npm run playlist:validate
  • npm run playlist:generate
  • npm run playlist:export
  • npm run readme:update
  • git config user.name "iptv-bot[bot]" git config user.email "84861620+iptv-bot[bot]@users.noreply.github.com"
  • git add streams 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
View raw YAML
name: update
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'
jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - 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@v6
        if: ${{ !env.ACT }}
        with:
          token: ${{ steps.create-app-token.outputs.token }}
      - uses: actions/setup-node@v6
        with:
          node-version: 22
          cache: 'npm'
      - name: Install dependencies
        run: npm install
      - name: Update internal playlists
        run: npm run playlist:update --silent >> $GITHUB_OUTPUT
        id: playlist-update
      - name: Check internal playlists
        run: |
          npm run playlist:lint
          npm run playlist:validate
      - name: Generate public playlists
        run: npm run playlist:generate
      - name: Create .api/streams.json
        run: npm run playlist:export
      - name: Update readme
        run: npm run readme:update
      - name: Setup git
        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: |
          git add streams
          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
      - name: Commit changes to PLAYLIST.md
        run: |
          git add PLAYLISTS.md
          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
      - name: Push all changes to the repository
        if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
        run: git push
      - name: Deploy public playlists to GitHub Pages
        uses: JamesIves/github-pages-deploy-action@4.1.1
        if: ${{ !env.ACT && github.ref == 'refs/heads/master' }}
        with:
          repository-name: iptv-org/iptv
          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] Deploy to GitHub Pages'
          clean: true
      - name: Move .api/streams.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