Skip to content

Commit

Permalink
Add curl
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <spam_blackhole@farcloser.world>
  • Loading branch information
apostasie committed Dec 3, 2024
1 parent c43a038 commit a7812f6
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/test-images-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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 -fsSL 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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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%"
Expand All @@ -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: |
Expand Down

0 comments on commit a7812f6

Please sign in to comment.