Skip to content

Commit

Permalink
Update author, repo, version
Browse files Browse the repository at this point in the history
  • Loading branch information
jpribyl committed Dec 2, 2022
1 parent 2de4644 commit 8419858
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 34 deletions.
61 changes: 30 additions & 31 deletions README.md
Expand Up @@ -16,6 +16,7 @@ The author had not considered a large number of layers to be cached, so those ve
## Example workflows

### Docker Compose

```yaml
name: CI

Expand All @@ -26,26 +27,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

# Pull the latest image to build, and avoid caching pull-only images.
# (docker pull is faster than caching in most cases.)
- run: docker-compose pull
# Pull the latest image to build, and avoid caching pull-only images.
# (docker pull is faster than caching in most cases.)
- run: docker-compose pull

# 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: jpribyl/action-docker-layer-caching@v0.1.0
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
# 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: jpribyl/action-docker-layer-caching@v0.1.1
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- run: docker-compose up --build
- run: docker-compose up --build

# Finally, "Post Run jpribyl/action-docker-layer-caching@v0.1.0",
# Finally, "Post Run jpribyl/action-docker-layer-caching@v0.1.1",
# which is the process of saving the cache, will be executed.
```


### docker build

```yaml
Expand All @@ -58,23 +58,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

# 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: jpribyl/action-docker-layer-caching@v0.1.0
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
# 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: jpribyl/action-docker-layer-caching@v0.1.1
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true

- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

# Finally, "Post Run jpribyl/action-docker-layer-caching@v0.1.0",
# Finally, "Post Run jpribyl/action-docker-layer-caching@v0.1.1",
# which is the process of saving the cache, will be executed.
```


## Inputs

See [action.yml](./action.yml) for details.
Expand All @@ -83,13 +82,13 @@ 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: jpribyl/action-docker-layer-caching@v0.1.0
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
with:
key: foo-docker-cache-{hash}
restore-keys: |
foo-docker-cache-
- uses: jpribyl/action-docker-layer-caching@v0.1.1
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
with:
key: foo-docker-cache-{hash}
restore-keys: |
foo-docker-cache-
```

**Note: You must include `{hash}` in the `key` input.** (`{hash}` is replaced by the hash value of the docker image when the action is executed.)
6 changes: 3 additions & 3 deletions package.json
@@ -1,9 +1,9 @@
{
"name": "action-docker-layer-cache",
"version": "0.0.0",
"version": "0.1.1",
"main": "index.ts",
"repository": "https://github.com/satackey/action-docker-layer-caching.git",
"author": "satackey <21271711+satackey@users.noreply.github.com>",
"repository": "https://github.com/jpribyl/action-docker-layer-caching.git",
"author": "jpribyl <jpribyl@users.noreply.github.com>",
"license": "MIT",
"dependencies": {
"@actions/cache": "^3.0.6",
Expand Down

0 comments on commit 8419858

Please sign in to comment.