From abc498d7d312bf2228098acbb10fdff82b8ce4b7 Mon Sep 17 00:00:00 2001
From: Nick Adcock <nick.adcock@docker.com>
Date: Wed, 22 Apr 2020 16:34:18 +0100
Subject: [PATCH] Add cache_froms input to support --cache-from

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
---
 README.md  | 10 ++++++++++
 action.yml |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/README.md b/README.md
index de81c4c..1e3d87f 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,7 @@ Suggestions and issues can be posted on the repositories [issues page](https://g
 * [target](#target)
 * [always_pull](#always_pull)
 * [build_args](#build_args)
+* [cache_froms](#cache_froms)
 * [labels](#labels)
 * [add_git_labels](#add_git_labels)
 * [push](#push)
@@ -114,6 +115,15 @@ Example:
 build_args: arg1=value1,arg2=value2
 ```
 
+### `cache_froms`
+
+Comma-delimited list of images to consider as cache sources.
+
+Example:
+```yaml
+cache_froms: myorg/baseimage:latest
+```
+
 ### `labels`
 
 Comma-delimited list of labels to add to the built image.
diff --git a/action.yml b/action.yml
index feaa08e..7720f15 100644
--- a/action.yml
+++ b/action.yml
@@ -50,6 +50,9 @@ inputs:
   build_args:
     description: Comma-delimited list of build-time variables
     required: false
+  cache_froms:
+    description: Comma-delimited list of images to consider as cache sources
+    required: false
   labels:
     description: Comma-delimited list of labels to add to the built image
     required: false