eggplants/y2m

View on GitHub
.github/workflows/update.yml

Summary

Maintainability
Test Coverage
name: M3U generator
on:
  workflow_dispatch:
  # schedule:
  #   - cron: '0 0/3 * * *'

jobs:
  update:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8]
    steps:
    - name: Checkout Repository
      uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install -U pip
        pip install -e .
    - name: Configure git credencial info of committer
      run: |
        git config --global user.email "action@github.com"
        git config --global user.name "GitHub Action"
    - name: Run
      run: |
        y2mconv youtube_channel_info.txt -o youtube.m3u -f
    - name: git add
      run: |
        git add -A
    - name: commit & push
      run: |
        git commit -m "update: $(date +%Y-%m-%d_%H:%M:%S)"
        git push