Skip to content

Commit

Permalink
Fix docker layer caching in build workflow
Browse files Browse the repository at this point in the history
* Only cache docker layers on Linux
* Add target OS name to cache key (futureproofing)
  • Loading branch information
rcowsill authored and dbouron committed Dec 24, 2020
1 parent 3528d6f commit 3af45a1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:

- name: Cache Docker layers
uses: satackey/[email protected]
with:
key: docker-layers-linux-{hash}
restore-keys: |
docker-layers-linux-
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

Expand All @@ -38,11 +42,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Cache Docker layers
uses: satackey/[email protected]
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Build Docker builder image
run: docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -f .github/docker/windows/Dockerfile -t builder .

Expand Down

0 comments on commit 3af45a1

Please sign in to comment.