Update schedule #817
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Update schedule' | |
| on: | |
| schedule: | |
| - cron: '0 22,10 * * *' | |
| 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: 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: 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 |