diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml index 98b5029..431b1a1 100644 --- a/.github/workflows/docker-pr.yml +++ b/.github/workflows/docker-pr.yml @@ -39,20 +39,20 @@ jobs: json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}' dir: 'backend/' - name: setup platform emulator - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: setup multi-arch docker build uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event.inputs.push_image == 'true' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry if: github.event.inputs.push_image == 'true' - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index faaf795..b748716 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -59,19 +59,19 @@ jobs: type=raw,value=latest - name: setup platform emulator - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: setup multi-arch docker build uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 982f966..892c14c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -44,7 +44,7 @@ jobs: dir: 'backend/' - name: setup platform emulator - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: setup multi-arch docker build uses: docker/setup-buildx-action@v3 @@ -66,13 +66,13 @@ jobs: type=sha,prefix=sha-,format=short - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.repository_owner }} diff --git a/backend/package-lock.json b/backend/package-lock.json index f65107b..7a6c6da 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -26,7 +26,7 @@ "express-session": "^1.19.0", "feed": "^5.2.0", "fluent-ffmpeg": "^2.1.3", - "fs-extra": "^11.3.3", + "fs-extra": "^11.3.4", "gotify": "^1.1.0", "jsonwebtoken": "^9.0.3", "lodash": "^4.17.23", @@ -2266,9 +2266,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz", - "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", + "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", diff --git a/backend/package.json b/backend/package.json index 0502247..3ce5798 100644 --- a/backend/package.json +++ b/backend/package.json @@ -40,7 +40,7 @@ "express-session": "^1.19.0", "feed": "^5.2.0", "fluent-ffmpeg": "^2.1.3", - "fs-extra": "^11.3.3", + "fs-extra": "^11.3.4", "gotify": "^1.1.0", "jsonwebtoken": "^9.0.3", "lodash": "^4.17.23", diff --git a/docker-utils/fetch-twitchdownloader.sh b/docker-utils/fetch-twitchdownloader.sh index 0ae3d4a..0050670 100644 --- a/docker-utils/fetch-twitchdownloader.sh +++ b/docker-utils/fetch-twitchdownloader.sh @@ -26,9 +26,30 @@ echo "(1/5) READY - Install unzip" apt-get update && apt-get -y install unzip curl libicu74 # Resolve latest version from GitHub's redirect endpoint to avoid API rate-limit failures. -LATEST_RELEASE_URL=$(curl -fsSL -o /dev/null -w '%{url_effective}' "https://github.com/lay295/TwitchDownloader/releases/latest") +LATEST_RELEASE_URL="$(curl -fL -o /dev/null -w '%{url_effective}' \ + --connect-timeout 10 \ + --max-time 60 \ + --retry 20 \ + --retry-delay 2 \ + --retry-max-time 300 \ + --retry-all-errors \ + "https://github.com/lay295/TwitchDownloader/releases/latest" || true)" VERSION="${LATEST_RELEASE_URL##*/}" +if [ -z "$VERSION" ] || [ "$VERSION" = "latest" ]; then + # Fallback to API in case the redirect endpoint is temporarily unavailable. + VERSION="$(curl -fsSL \ + --connect-timeout 10 \ + --max-time 60 \ + --retry 20 \ + --retry-delay 2 \ + --retry-max-time 300 \ + --retry-all-errors \ + "https://api.github.com/repos/lay295/TwitchDownloader/releases/latest" \ + | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' \ + | head -n 1 || true)" +fi + if [ -z "$VERSION" ] || [ "$VERSION" = "latest" ]; then echo "Unable to resolve TwitchDownloader latest release version." exit 1 diff --git a/package-lock.json b/package-lock.json index 42226bb..13dd84d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "crypto-js": "^4.2.0", "file-saver": "^2.0.2", "filesize": "^11.0.13", - "fs-extra": "^11.3.3", + "fs-extra": "^11.3.4", "material-icons": "^1.10.8", "nan": "^2.14.1", "ngx-avatars": "1.10.1", @@ -10162,9 +10162,9 @@ } }, "node_modules/fs-extra": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.3.tgz", - "integrity": "sha512-VWSRii4t0AFm6ixFFmLLx1t7wS1gh+ckoa84aOeapGum0h+EZd1EhEumSB+ZdDLnEPuucsVB9oB7cxJHap6Afg==", + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.4.tgz", + "integrity": "sha512-CTXd6rk/M3/ULNQj8FBqBWHYBVYybQ3VPBw0xGKFe3tuH7ytT6ACnvzpIQ3UZtB8yvUKC2cXn1a+x+5EVQLovA==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", diff --git a/package.json b/package.json index 2241e49..89036a4 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "crypto-js": "^4.2.0", "file-saver": "^2.0.2", "filesize": "^11.0.13", - "fs-extra": "^11.3.3", + "fs-extra": "^11.3.4", "material-icons": "^1.10.8", "nan": "^2.14.1", "ngx-avatars": "1.10.1",