Skip to content

curl-impersonate: A special build of curl that can impersonate Chrome & Firefox

Split GitHub Action cache to two directories

lwthikerce95990620a7
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index d9f4f29..ac8d04b 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -36,7 +36,9 @@ jobs:
- name: Cache Docker layers
uses: actions/cache@v2
with:
- path: /tmp/.buildx-cache
+ path: |
+ /tmp/.buildx-cache-ff
+ /tmp/.buildx-cache-ch
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
@@ -47,8 +49,8 @@ jobs:
push: true
context: chrome/
tags: localhost:5000/curl-impersonate/chrome
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
+ cache-from: type=local,src=/tmp/.buildx-cache-ch
+ cache-to: type=local,dest=/tmp/.buildx-cache-ch-new,mode=max
- name: Build the Firefox version of curl-impersonate
uses: docker/build-push-action@v2
@@ -56,8 +58,8 @@ jobs:
push: true
context: firefox/
tags: localhost:5000/curl-impersonate/ff
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
+ cache-from: type=local,src=/tmp/.buildx-cache-ff
+ cache-to: type=local,dest=/tmp/.buildx-cache-ff-new,mode=max
- name: Build the tests container
uses: docker/build-push-action@v2
@@ -77,5 +79,7 @@ jobs:
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
- rm -rf /tmp/.buildx-cache
- mv /tmp/.buildx-cache-new /tmp/.buildx-cache
+ rm -rf /tmp/.buildx-cache-ff
+ mv /tmp/.buildx-cache-ff-new /tmp/.buildx-cache-ff
+ rm -rf /tmp/.buildx-cache-ch
+ mv /tmp/.buildx-cache-ch-new /tmp/.buildx-cache-ch