name: 'Update schedule' on: schedule: - cron: '10 23,09 * * *' workflow_dispatch: branches: - master - dev - gd jobs: push: runs-on: ${{ matrix.operating-system }} strategy: matrix: operating-system: [ 'ubuntu-latest' ] steps: - name: Set branch name id: vars run: echo "BRANCH_NAME=${{ github.repository_owner == 'Guovin' && 'gd' || 'master' }}" >> $GITHUB_ENV - uses: actions/checkout@v3 with: ref: ${{ env.BRANCH_NAME }} - name: Run with setup-python 3.13 uses: actions/setup-python@v4 with: python-version: '3.13' update-environment: true cache: 'pipenv' - name: Check open_driver config id: check_driver run: | echo "OPEN_DRIVER=$(python -c ' try: from utils.config import config open_driver = config.open_driver except: open_driver = False print(open_driver)')" >> $GITHUB_ENV - name: Set up Chrome if: env.OPEN_DRIVER == 'True' uses: browser-actions/setup-chrome@latest with: chrome-version: stable - name: Download chrome driver if: env.OPEN_DRIVER == 'True' uses: nanasess/setup-chromedriver@master - name: Install FFmpeg run: sudo apt-get update && sudo apt-get install -y ffmpeg - name: Install pipenv run: pip3 install --user pipenv - name: Install dependecies run: pipenv --python 3.13 && pipenv install --deploy - name: Install selenium if: env.OPEN_DRIVER == 'True' run: pipenv install selenium - name: Update run: pipenv run dev - name: Commit and push if changed run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add . if ! git diff --staged --quiet; then git commit -m "Github Action Auto Updated" git push --force fi