Download new assets #7399
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: Download new assets | |
| on: | |
| workflow_dispatch: null | |
| schedule: | |
| - cron: 0 * * * * | |
| concurrency: | |
| group: '${{ github.ref }}' | |
| jobs: | |
| update: | |
| name: Update | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| args: | |
| - --branch cn --server cn --filter art | |
| - --branch voice --server cn --filter audio | |
| - --branch en --server en --filter art | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'master' | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| dotnet: false | |
| large-packages: false | |
| - name: Remove all .NET versions | |
| run: | | |
| sudo apt-get remove --purge -y dotnet* || true | |
| sudo apt-get autoremove -y | |
| sudo rm -rf /usr/share/dotnet /etc/dotnet | |
| - name: Install .NET 6.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Install python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Prepare environment | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git config http.postBuffer 2147483648 | |
| if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then echo "FORCE=--force" >> $GITHUB_ENV; fi | |
| python -m pip install -U requests | |
| sudo apt-get update | |
| sudo apt-get install -y ffmpeg | |
| - name: Update assets | |
| run: python script.py ${{ matrix.args }} ${{ env.FORCE }} |