From 9e05a3962e37114002646644efa81edcf83361e7 Mon Sep 17 00:00:00 2001 From: Maxime Gervais Date: Fri, 22 Mar 2024 23:30:18 +0100 Subject: [PATCH] CI: Pin to ffmpeg release 6.1 for Windows CI Signed-off-by: Maxime Gervais --- .github/workflows/dvrescue-gui.yml | 82 ++++++++++++++---------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/.github/workflows/dvrescue-gui.yml b/.github/workflows/dvrescue-gui.yml index 2bd61b65..903ca4f7 100644 --- a/.github/workflows/dvrescue-gui.yml +++ b/.github/workflows/dvrescue-gui.yml @@ -507,20 +507,18 @@ jobs: - name: Install wget & unzip run: | - choco install wget unzip xidel + choco install wget unzip - name: Install FFmpeg - shell: cmd + shell: pwsh run: | - cd .. - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "//a[contains(@href, '-gpl-shared.zip')]/@href[1]" --silent > ffmpeg.url - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "(//a[contains(@href, '-gpl-shared.zip')])[1]/substring(., 0, string-length(.) - 3)" --silent > ffmpeg.name - set /P FFMPEG_URL=< ffmpeg.url - set /P FFMPEG_NAME=< ffmpeg.name - wget https://github.com%FFMPEG_URL% - unzip %FFMPEG_NAME%.zip - ren %FFMPEG_NAME% ffmpeg - dir ffmpeg + Set-Location .. + $json = $(curl -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/latest) + $ffmpeg_name = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).name | sub("\\.zip$";"")') + $ffmpeg_url = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).browser_download_url') + Invoke-WebRequest -Uri "$ffmpeg_url" -OutFile "$ffmpeg_name.zip" + Expand-Archive -Path "$ffmpeg_name.zip" -DestinationPath . + Rename-Item -Path "$ffmpeg_name" -NewName "ffmpeg" - name: Download and configure qwt run: | @@ -608,20 +606,18 @@ jobs: - name: Install wget & unzip run: | - choco install wget unzip xidel + choco install wget unzip - name: Install FFmpeg - shell: cmd + shell: pwsh run: | - cd .. - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "//a[contains(@href, '-gpl-shared.zip')]/@href[1]" --silent > ffmpeg.url - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "(//a[contains(@href, '-gpl-shared.zip')])[1]/substring(., 0, string-length(.) - 3)" --silent > ffmpeg.name - set /P FFMPEG_URL=< ffmpeg.url - set /P FFMPEG_NAME=< ffmpeg.name - wget https://github.com%FFMPEG_URL% - unzip %FFMPEG_NAME%.zip - ren %FFMPEG_NAME% ffmpeg - dir ffmpeg + Set-Location .. + $json = $(curl -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/latest) + $ffmpeg_name = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).name | sub("\\.zip$";"")') + $ffmpeg_url = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).browser_download_url') + Invoke-WebRequest -Uri "$ffmpeg_url" -OutFile "$ffmpeg_name.zip" + Expand-Archive -Path "$ffmpeg_name.zip" -DestinationPath . + Rename-Item -Path "$ffmpeg_name" -NewName "ffmpeg" - name: Download and configure qwt run: | @@ -710,20 +706,18 @@ jobs: - name: Install wget & unzip run: | - choco install wget unzip xidel + choco install wget unzip - name: Install FFmpeg - shell: cmd + shell: pwsh run: | - cd .. - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "//a[contains(@href, '-gpl-shared.zip')]/@href[1]" --silent > ffmpeg.url - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "(//a[contains(@href, '-gpl-shared.zip')])[1]/substring(., 0, string-length(.) - 3)" --silent > ffmpeg.name - set /P FFMPEG_URL=< ffmpeg.url - set /P FFMPEG_NAME=< ffmpeg.name - wget https://github.com%FFMPEG_URL% - unzip %FFMPEG_NAME%.zip - ren %FFMPEG_NAME% ffmpeg - dir ffmpeg + Set-Location .. + $json = $(curl -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/latest) + $ffmpeg_name = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).name | sub("\\.zip$";"")') + $ffmpeg_url = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).browser_download_url') + Invoke-WebRequest -Uri "$ffmpeg_url" -OutFile "$ffmpeg_name.zip" + Expand-Archive -Path "$ffmpeg_name.zip" -DestinationPath . + Rename-Item -Path "$ffmpeg_name" -NewName "ffmpeg" - name: Download and configure qwt run: | @@ -810,20 +804,18 @@ jobs: - name: Install wget & unzip run: | - choco install wget unzip xidel + choco install wget unzip - name: Install FFmpeg - shell: cmd - run: | - cd .. - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "//a[contains(@href, '-gpl-shared.zip')]/@href[1]" --silent > ffmpeg.url - xidel https://github.com/BtbN/FFmpeg-Builds/releases -e "(//a[contains(@href, '-gpl-shared.zip')])[1]/substring(., 0, string-length(.) - 3)" --silent > ffmpeg.name - set /P FFMPEG_URL=< ffmpeg.url - set /P FFMPEG_NAME=< ffmpeg.name - wget https://github.com%FFMPEG_URL% - unzip %FFMPEG_NAME%.zip - ren %FFMPEG_NAME% ffmpeg - dir ffmpeg + shell: pwsh + run: | + Set-Location .. + $json = $(curl -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/BtbN/FFmpeg-Builds/releases/latest) + $ffmpeg_name = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).name | sub("\\.zip$";"")') + $ffmpeg_url = $($json | jq -r '.assets[] | select(.name | endswith("-gpl-shared-6.1.zip")).browser_download_url') + Invoke-WebRequest -Uri "$ffmpeg_url" -OutFile "$ffmpeg_name.zip" + Expand-Archive -Path "$ffmpeg_name.zip" -DestinationPath . + Rename-Item -Path "$ffmpeg_name" -NewName "ffmpeg" - name: Download and configure qwt run: |