-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from satackey/reduce_concurrency
Limit the concurrency of restoring and saving layers
- Loading branch information
Showing
7 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,11 @@ You can run `docker build` and `docker-compose build` in your GitHub Actions wor | |
|
||
This GitHub Action uses the [docker save](https://docs.docker.com/engine/reference/commandline/save/) / [docker load](https://docs.docker.com/engine/reference/commandline/load/) command and the [@actions/cache](https://www.npmjs.com/package/@actions/cache) library. | ||
|
||
## ⚠️ **Deprecation Notice for `v0.0.4` and older** ⚠️ | ||
|
||
The author had not taken into account that a large number of layers would be cached, | ||
so those versions processes all layers in parallel. ([#12](https://github.com/satackey/action-docker-layer-caching/issues/12)) | ||
**Please update to version `v0.0.5` with limited concurrency to avoid overloading the cache service.** | ||
|
||
## Example workflows | ||
|
||
|
@@ -30,11 +35,11 @@ jobs: | |
# In this step, this action saves a list of existing images, | ||
# the cache is created without them in the post run. | ||
# It also restores the cache if it exists. | ||
- uses: satackey/[email protected].4 | ||
- uses: satackey/[email protected].5 | ||
|
||
- run: docker-compose up --build | ||
|
||
# Finally, "Post Run satackey/[email protected].4", | ||
# Finally, "Post Run satackey/[email protected].5", | ||
# which is the process of saving the cache, will be executed. | ||
``` | ||
|
||
|
@@ -56,12 +61,12 @@ jobs: | |
# In this step, this action saves a list of existing images, | ||
# the cache is created without them in the post run. | ||
# It also restores the cache if it exists. | ||
- uses: satackey/[email protected].4 | ||
- uses: satackey/[email protected].5 | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) | ||
|
||
# Finally, "Post Run satackey/[email protected].4", | ||
# Finally, "Post Run satackey/[email protected].5", | ||
# which is the process of saving the cache, will be executed. | ||
``` | ||
|
||
|
@@ -74,7 +79,7 @@ By default, the cache is separated by the workflow name. | |
You can also set the cache key manually, like the official [actions/cache](https://github.com/actions/cache#usage) action. | ||
|
||
```yaml | ||
- uses: satackey/[email protected].4 | ||
- uses: satackey/[email protected].5 | ||
with: | ||
key: foo-docker-cache-{hash} | ||
restore-keys: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters