From e54c217f066bc8be0930c24568f929dcf58d6c78 Mon Sep 17 00:00:00 2001 From: apostasie Date: Mon, 2 Dec 2024 17:16:56 -0800 Subject: [PATCH] Add curl Signed-off-by: apostasie --- .github/workflows/test-images-build.yml | 39 +++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-images-build.yml b/.github/workflows/test-images-build.yml index a225590c34d..342e4c67109 100644 --- a/.github/workflows/test-images-build.yml +++ b/.github/workflows/test-images-build.yml @@ -14,6 +14,7 @@ env: REGISTRY: ghcr.io BUSYBOX_VERSION: 5ad83957fa74aafd061afbfb8da14ce3220659a9 REGISTRY_VERSION: v2.8.3 + CURL_VERSION: 8.11.0_4 jobs: build-busybox: @@ -25,7 +26,7 @@ jobs: with: path: busybox.exe enableCrossOsArchive: true - key: cache-busybox-${{ env.BUSYBOX_VERSION }}-a + key: cache-busybox-${{ env.BUSYBOX_VERSION }} - uses: actions/checkout@v4 if: steps.cache-busybox.outputs.cache-hit != 'true' with: @@ -43,6 +44,24 @@ jobs: cd - cp ./src/busybox-w32/busybox.exe . + build-curl: + name: busybox + runs-on: ubuntu-24.04 + steps: + - id: cache-curl + uses: actions/cache@v4 + with: + path: curl.exe + enableCrossOsArchive: true + key: cache-curl-${{ env.CURL_VERSION }} + - name: "" + if: steps.cache-curl.outputs.cache-hit != 'true' + run: | + curl -fsSLO https://curl.se/windows/dl-${CURL_VERSION}/curl-${CURL_VERSION}-win64-mingw.zip + unzip curl-${CURL_VERSION}-win64-mingw.zip + cp ./curl-${CURL_VERSION}-win64-mingw/bin/curl.exe . + + build-registry: name: registry runs-on: ubuntu-24.04 @@ -52,7 +71,7 @@ jobs: with: path: build enableCrossOsArchive: true - key: cache-registry-${{ env.REGISTRY_VERSION }}-a + key: cache-registry-${{ env.REGISTRY_VERSION }} - uses: actions/checkout@v4 if: steps.cache-registry.outputs.cache-hit != 'true' with: @@ -82,7 +101,9 @@ jobs: image-busybox: name: image-busybox runs-on: windows-2022 - needs: build-busybox + needs: + - build-busybox + - build-curl defaults: run: shell: bash @@ -92,7 +113,14 @@ jobs: with: path: busybox.exe enableCrossOsArchive: true - key: cache-busybox-${{ env.BUSYBOX_VERSION }}-a + key: cache-busybox-${{ env.BUSYBOX_VERSION }} + fail-on-cache-miss: true + - uses: actions/cache/restore@v4 + id: cache-curl + with: + path: curl.exe + enableCrossOsArchive: true + key: cache-curl-${{ env.CURL_VERSION }} fail-on-cache-miss: true - name: "Prep busybox image" run: | @@ -102,6 +130,7 @@ jobs: RUN mkdir C:\\tmp RUN mkdir C:\\bin COPY busybox.exe C:/bin/ + COPY curl.exe C:/bin/ ENV PATH="C:\\bin;\$WindowsPATH;C:\\Windows\\System32" # FIXME: does not work for some reason # RUN setx /M PATH "C:\\bin;%PATH%" @@ -127,7 +156,7 @@ jobs: with: path: build enableCrossOsArchive: true - key: cache-registry-${{ env.REGISTRY_VERSION }}-a + key: cache-registry-${{ env.REGISTRY_VERSION }} fail-on-cache-miss: true - name: "Prep registry image" run: |