Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattes/cached-docker-build-action

Store and retrieve docker images from Github Cache.
https://github.com/mattes/cached-docker-build-action

cache docker docker-build docker-image github-action github-action-cache

Last synced: 29 days ago
JSON representation

Store and retrieve docker images from Github Cache.

Awesome Lists containing this project

README

        

# Cached Docker Build

This Github Action caches docker builds using the
official [actions/cache](https://github.com/actions/toolkit/tree/main/packages/cache) library.

## Github Action Inputs

| Variable | Description |
|----------------------------------|-----------------------------------------------------------------------------|
| `args` | ***Required*** Arguments passed to `docker build` command |
| `cache_key` | ***Required*** Key used for caching |

## Example Usage

```
uses: mattes/cached-docker-build-action@v1
with:
args: "--pull --file Dockerfile --tag my-image:tag ."
cache_key: "${{ hashFiles('**/lockfiles') }}"
```

## Future work

* Implement `expires` flag, blocked by [Clear cache #2](https://github.com/actions/cache/issues/2).