From 67f1b147ccbaba63108c122b4759cecfa6543ae0 Mon Sep 17 00:00:00 2001 From: f18326186224 Date: Tue, 18 Jun 2024 04:28:31 +0800 Subject: [PATCH] fix: Fixed the problem of m4a audio download bit rate being too low --- .dockerignore | 1 + .github/workflows/main.yml | 77 +++++++++++------------------ .github/workflows/update-yt-dlp.yml | 5 +- .gitignore | 1 + 4 files changed, 34 insertions(+), 50 deletions(-) diff --git a/.dockerignore b/.dockerignore index f49e149..98a36ae 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ .venv ui/.angular ui/node_modules +/.idea/* diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f54f4b6..b47e49b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,60 +6,41 @@ on: - 'master' jobs: - dockerhub-build-push: + push_to_registries: + name: Push Docker image to multiple registries runs-on: ubuntu-latest + permissions: + packages: write + contents: read steps: - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: | + ghcr.io/${{ github.repository }} + + - name: Build and push Docker images + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . platforms: linux/amd64,linux/arm64 push: true - tags: | - ${{ secrets.DOCKERHUB_REPOSITORY }}:latest - ${{ secrets.DOCKERHUB_REPOSITORY }}:${{ steps.date.outputs.date }} - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ steps.date.outputs.date }} - - dockerhub-sync-readme: - needs: dockerhub-build-push - runs-on: ubuntu-latest - steps: - - name: Sync README - uses: docker://lsiodev/readme-sync:latest - env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - GIT_REPOSITORY: ${{ github.repository }} - DOCKER_REPOSITORY: ${{ secrets.DOCKERHUB_REPOSITORY }} - GIT_BRANCH: master - with: - entrypoint: node - args: /opt/docker-readme-sync/sync + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/update-yt-dlp.yml b/.github/workflows/update-yt-dlp.yml index ab8433d..b801015 100644 --- a/.github/workflows/update-yt-dlp.yml +++ b/.github/workflows/update-yt-dlp.yml @@ -1,8 +1,9 @@ name: update-yt-dlp on: - schedule: - - cron: '0 0 * * *' + workflow_dispatch: +# schedule: +# - cron: '0 0 * * *' jobs: update-yt-dlp : diff --git a/.gitignore b/.gitignore index ac87c29..5c9f69d 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ Thumbs.db __pycache__ .venv +/.idea/*