no-cache-filters input

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax committed 2022-07-19 00:04:41 +02:00
1 parent a8d76c070a
commit 5ffbca1432
7 files changed
+73 -42

No files matched your search

+20 -6
View File
@@ -310,7 +310,6 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.7.0
driver-opts: |
image=moby/buildkit:master
-
@@ -332,7 +331,6 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.7.0
driver-opts: |
image=moby/buildkit:master
-
@@ -356,7 +354,6 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.7.0
driver-opts: |
image=moby/buildkit:master
-
@@ -397,8 +394,6 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.8.0
-
name: Build
uses: ./
@@ -409,6 +404,26 @@ jobs:
alpine=docker-image://debian:stable-slim
tags: name/app:latest
no-cache-filters:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: ./
with:
context: ./test
file: ./test/nocachefilter.Dockerfile
no-cache-filters: build
tags: name/app:latest
cache-from: type=gha,scope=nocachefilter
cache-to: type=gha,scope=nocachefilter,mode=max
multi:
runs-on: ubuntu-latest
strategy:
@@ -506,7 +521,6 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.8.0
driver: ${{ matrix.driver }}
driver-opts: |
network=host
+34 -33
View File
@@ -197,44 +197,45 @@ Following inputs can be used as `step.with` keys
> tags: name/app:latest,name/app:1.0.0
> ```
| Name | Type | Description |
|---------------------|----------|------------------------------------|
| `add-hosts` | List/CSV | List of [customs host-to-IP mapping](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) (e.g., `docker:10.180.0.1`) |
| `allow` | List/CSV | List of [extra privileged entitlement](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#allow) (e.g., `network.host,security.insecure`) |
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
| `build-args` | List | List of [build-time variables](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#build-arg) |
| `build-contexts` | List | List of additional [build contexts](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#build-context) (e.g., `name=path`) |
| `cache-from` | List | List of [external cache sources](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-from) (e.g., `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-to) (e.g., `type=local,dest=path/to/dir`) |
| `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
| `labels` | List | List of metadata for an image |
| `load` | Bool | [Load](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#load) is a shorthand for `--output=type=docker` (default `false`) |
| `network` | String | Set the networking mode for the `RUN` instructions during build |
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
| `outputs` | List | List of [output destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#output) (format: `type=local,dest=path`) |
| `platforms` | List/CSV | List of [target platforms](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#platform) for build |
| `pull` | Bool | Always attempt to pull all referenced images (default `false`) |
| `push` | Bool | [Push](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#push) is a shorthand for `--output=type=registry` (default `false`) |
| `secrets` | List | List of [secrets](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=string`, `GIT_AUTH_TOKEN=mytoken`) |
| `secret-files` | List | List of [secret files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=filename`, `MY_SECRET=./secret.txt`) |
| `shm-size` | String | Size of [`/dev/shm`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-size-of-devshm---shm-size) (e.g., `2g`) |
| `ssh` | List | List of [SSH agent socket or keys](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#ssh) to expose to the build |
| `tags` | List/CSV | List of tags |
| `target` | String | Sets the target stage to build |
| `ulimit` | List | [Ulimit](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-set-ulimits---ulimit) options (e.g., `nofile=1024:1024`) |
| `github-token` | String | GitHub Token used to authenticate against a repository for [Git context](#git-context) (default `${{ github.token }}`) |
| Name | Type | Description |
|--------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `add-hosts` | List/CSV | List of [customs host-to-IP mapping](https://docs.docker.com/engine/reference/commandline/build/#add-entries-to-container-hosts-file---add-host) (e.g., `docker:10.180.0.1`) |
| `allow` | List/CSV | List of [extra privileged entitlement](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#allow) (e.g., `network.host,security.insecure`) |
| `builder` | String | Builder instance (see [setup-buildx](https://github.com/docker/setup-buildx-action) action) |
| `build-args` | List | List of [build-time variables](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#build-arg) |
| `build-contexts` | List | List of additional [build contexts](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#build-context) (e.g., `name=path`) |
| `cache-from` | List | List of [external cache sources](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-from) (e.g., `type=local,src=path/to/dir`) |
| `cache-to` | List | List of [cache export destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#cache-to) (e.g., `type=local,dest=path/to/dir`) |
| `cgroup-parent` | String | Optional [parent cgroup](https://docs.docker.com/engine/reference/commandline/build/#use-a-custom-parent-cgroup---cgroup-parent) for the container used in the build |
| `context` | String | Build's context is the set of files located in the specified [`PATH` or `URL`](https://docs.docker.com/engine/reference/commandline/build/) (default [Git context](#git-context)) |
| `file` | String | Path to the Dockerfile. (default `{context}/Dockerfile`) |
| `labels` | List | List of metadata for an image |
| `load` | Bool | [Load](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#load) is a shorthand for `--output=type=docker` (default `false`) |
| `network` | String | Set the networking mode for the `RUN` instructions during build |
| `no-cache` | Bool | Do not use cache when building the image (default `false`) |
| `no-cache-filters` | List/CSV | Do not cache specified stages |
| `outputs` | List | List of [output destinations](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#output) (format: `type=local,dest=path`) |
| `platforms` | List/CSV | List of [target platforms](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#platform) for build |
| `pull` | Bool | Always attempt to pull all referenced images (default `false`) |
| `push` | Bool | [Push](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#push) is a shorthand for `--output=type=registry` (default `false`) |
| `secrets` | List | List of [secrets](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=string`, `GIT_AUTH_TOKEN=mytoken`) |
| `secret-files` | List | List of [secret files](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#secret) to expose to the build (e.g., `key=filename`, `MY_SECRET=./secret.txt`) |
| `shm-size` | String | Size of [`/dev/shm`](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-size-of-devshm---shm-size) (e.g., `2g`) |
| `ssh` | List | List of [SSH agent socket or keys](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#ssh) to expose to the build |
| `tags` | List/CSV | List of tags |
| `target` | String | Sets the target stage to build |
| `ulimit` | List | [Ulimit](https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-set-ulimits---ulimit) options (e.g., `nofile=1024:1024`) |
| `github-token` | String | GitHub Token used to authenticate against a repository for [Git context](#git-context) (default `${{ github.token }}`) |
### outputs
Following outputs are available
| Name | Type | Description |
|-------------------|---------|---------------------------------------|
| `imageid` | String | Image ID |
| `digest` | String | Image digest |
| `metadata` | JSON | Build result metadata |
| Name | Type | Description |
|------------|---------|-----------------------------------------|
| `imageid` | String | Image ID |
| `digest` | String | Image digest |
| `metadata` | JSON | Build result metadata |
## Troubleshooting
+3
View File
@@ -51,6 +51,9 @@ inputs:
description: "Do not use cache when building the image"
required: false
default: 'false'
no-cache-filters:
description: "Do not cache specified stages"
required: false
outputs:
description: "List of output destinations (format: type=local,dest=path)"
required: false
Generated Vendored
+2 -2
View File
@@ -10,7 +10,7 @@ require('./sourcemap-register.js');(()=>{var __webpack_modules__={5241:function(
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},7129:(e,t,r)=>{"use strict";const a=r(665);const i=Symbol("max");const s=Symbol("length");const p=Symbol("lengthCalculator");const o=Symbol("allowStale");const n=Symbol("maxAge");const d=Symbol("dispose");const l=Symbol("noDisposeOnSet");const u=Symbol("lruList");const m=Symbol("cache");const c=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||naiveLength;this[p]=typeof r!=="function"?naiveLength:r;this[o]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[n]=e.maxAge||0;this[d]=e.dispose;this[l]=e.noDisposeOnSet||false;this[c]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;trim(this)}get max(){return this[i]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[n]=e;trim(this)}get maxAge(){return this[n]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[p]){this[p]=e;this[s]=0;this[u].forEach((e=>{e.length=this[p](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[p]}get length(){return this[s]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;r!==null;){const a=r.prev;forEachStep(this,e,r,t);r=a}}forEach(e,t){t=t||this;for(let r=this[u].head;r!==null;){const a=r.next;forEachStep(this,e,r,t);r=a}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){if(this[d]&&this[u]&&this[u].length){this[u].forEach((e=>this[d](e.key,e.value)))}this[m]=new Map;this[u]=new a;this[s]=0}dump(){return this[u].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,r){r=r||this[n];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const a=r?Date.now():0;const o=this[p](t,e);if(this[m].has(e)){if(o>this[i]){del(this,this[m].get(e));return false}const p=this[m].get(e);const n=p.value;if(this[d]){if(!this[l])this[d](e,n.value)}n.now=a;n.maxAge=r;n.value=t;this[s]+=o-n.length;n.length=o;this.get(e);trim(this);return true}const c=new Entry(e,t,o,a,r);if(c.length>this[i]){if(this[d])this[d](e,t);return false}this[s]+=c.length;this[u].unshift(c);this[m].set(e,this[u].head);trim(this);return true}has(e){if(!this[m].has(e))return false;const t=this[m].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[u].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[m].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const a=e[r];const i=a.e||0;if(i===0)this.set(a.k,a.v);else{const e=i-t;if(e>0){this.set(a.k,a.v,e)}}}}prune(){this[m].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const a=e[m].get(t);if(a){const t=a.value;if(isStale(e,t)){del(e,a);if(!e[o])return undefined}else{if(r){if(e[c])a.value.now=Date.now();e[u].unshiftNode(a)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[n])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[n]&&r>e[n]};const trim=e=>{if(e[s]>e[i]){for(let t=e[u].tail;e[s]>e[i]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[d])e[d](r.key,r.value);e[s]-=r.length;e[m].delete(r.key);e[u].removeNode(t)}};class Entry{constructor(e,t,r,a,i){this.key=e;this.value=t;this.length=r;this.now=a;this.maxAge=i||0}}const forEachStep=(e,t,r,a)=>{let i=r.value;if(isStale(e,i)){del(e,r);if(!e[o])i=undefined}if(i)t.call(a,i.value,i.key,e)};e.exports=LRUCache},3973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var a={sep:"/"};try{a=r(1017)}catch(e){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(3717);var p={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var n=o+"*?";var d="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var l="(?:(?!(?:\\/|^)\\.).)*?";var u=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var m=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,a,i){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach((funcLine truncated
*/function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},7129:(e,t,r)=>{"use strict";const a=r(665);const i=Symbol("max");const s=Symbol("length");const p=Symbol("lengthCalculator");const o=Symbol("allowStale");const n=Symbol("maxAge");const d=Symbol("dispose");const l=Symbol("noDisposeOnSet");const u=Symbol("lruList");const m=Symbol("cache");const c=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||naiveLength;this[p]=typeof r!=="function"?naiveLength:r;this[o]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[n]=e.maxAge||0;this[d]=e.dispose;this[l]=e.noDisposeOnSet||false;this[c]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;trim(this)}get max(){return this[i]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[n]=e;trim(this)}get maxAge(){return this[n]}set lengthCalculator(e){if(typeof e!=="function")e=naiveLength;if(e!==this[p]){this[p]=e;this[s]=0;this[u].forEach((e=>{e.length=this[p](e.value,e.key);this[s]+=e.length}))}trim(this)}get lengthCalculator(){return this[p]}get length(){return this[s]}get itemCount(){return this[u].length}rforEach(e,t){t=t||this;for(let r=this[u].tail;r!==null;){const a=r.prev;forEachStep(this,e,r,t);r=a}}forEach(e,t){t=t||this;for(let r=this[u].head;r!==null;){const a=r.next;forEachStep(this,e,r,t);r=a}}keys(){return this[u].toArray().map((e=>e.key))}values(){return this[u].toArray().map((e=>e.value))}reset(){if(this[d]&&this[u]&&this[u].length){this[u].forEach((e=>this[d](e.key,e.value)))}this[m]=new Map;this[u]=new a;this[s]=0}dump(){return this[u].map((e=>isStale(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[u]}set(e,t,r){r=r||this[n];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const a=r?Date.now():0;const o=this[p](t,e);if(this[m].has(e)){if(o>this[i]){del(this,this[m].get(e));return false}const p=this[m].get(e);const n=p.value;if(this[d]){if(!this[l])this[d](e,n.value)}n.now=a;n.maxAge=r;n.value=t;this[s]+=o-n.length;n.length=o;this.get(e);trim(this);return true}const c=new Entry(e,t,o,a,r);if(c.length>this[i]){if(this[d])this[d](e,t);return false}this[s]+=c.length;this[u].unshift(c);this[m].set(e,this[u].head);trim(this);return true}has(e){if(!this[m].has(e))return false;const t=this[m].get(e).value;return!isStale(this,t)}get(e){return get(this,e,true)}peek(e){return get(this,e,false)}pop(){const e=this[u].tail;if(!e)return null;del(this,e);return e.value}del(e){del(this,this[m].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const a=e[r];const i=a.e||0;if(i===0)this.set(a.k,a.v);else{const e=i-t;if(e>0){this.set(a.k,a.v,e)}}}}prune(){this[m].forEach(((e,t)=>get(this,t,false)))}}const get=(e,t,r)=>{const a=e[m].get(t);if(a){const t=a.value;if(isStale(e,t)){del(e,a);if(!e[o])return undefined}else{if(r){if(e[c])a.value.now=Date.now();e[u].unshiftNode(a)}}return t.value}};const isStale=(e,t)=>{if(!t||!t.maxAge&&!e[n])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[n]&&r>e[n]};const trim=e=>{if(e[s]>e[i]){for(let t=e[u].tail;e[s]>e[i]&&t!==null;){const r=t.prev;del(e,t);t=r}}};const del=(e,t)=>{if(t){const r=t.value;if(e[d])e[d](r.key,r.value);e[s]-=r.length;e[m].delete(r.key);e[u].removeNode(t)}};class Entry{constructor(e,t,r,a,i){this.key=e;this.value=t;this.length=r;this.now=a;this.maxAge=i||0}}const forEachStep=(e,t,r,a)=>{let i=r.value;if(isStale(e,i)){del(e,r);if(!e[o])i=undefined}if(i)t.call(a,i.value,i.key,e)};e.exports=LRUCache},3973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var a={sep:"/"};try{a=r(1017)}catch(e){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var s=r(3717);var p={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var n=o+"*?";var d="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var l="(?:(?!(?:\\/|^)\\.).)*?";var u=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var m=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,a,i){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach((funcLine truncated
/*!
* Tmp
*
@@ -18,5 +18,5 @@ require('./sourcemap-register.js');(()=>{var __webpack_modules__={5241:function(
*
* MIT Licensed
*/
const a=r(7147);const i=r(2037);const s=r(1017);const p=r(6113);const o={fs:a.constants,os:i.constants};const n=r(4959);const d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,u=3,m=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),c=i.platform()==="win32",h=o.EBADF||o.os.errno.EBADF,v=o.ENOENT||o.os.errno.ENOENT,g=448,_=384,w="exit",b=[],y=a.rmdirSync.bind(a),E=n.sync;let S=false;function tmpName(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];try{_assertAndSanitizeOptions(i)}catch(e){return s(e)}let p=i.tries;(function _getUniqueName(){try{const e=_generateTmpName(i);a.stat(e,(function(t){if(!t){if(p-- >0)return _getUniqueName();return s(new Error("Could not get a unique tmp filename, max tries reached "+e))}s(null,e)}))}catch(e){s(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),r=t[0];_assertAndSanitizeOptions(r);let i=r.tries;do{const e=_generateTmpName(r);try{a.statSync(e)}catch(t){return e}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);a.open(t,m,i.mode||_,(function _fileCreated(e,r){if(e)return s(e);if(i.discardDescriptor){return a.close(r,(function _discardCallback(e){return s(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,i,false))}))}else{const e=i.discardDescriptor||i.detachDescriptor;s(null,t,r,_prepareTmpFileRemoveCallback(t,e?-1:r,i,false))}}))}))}function fileSync(e){const t=_parseArguments(e),r=t[0];const i=r.discardDescriptor||r.detachDescriptor;const s=tmpNameSync(r);var p=a.openSync(s,m,r.mode||_);if(r.discardDescriptor){a.closeSync(p);p=undefined}return{name:s,fd:p,removeCallback:_prepareTmpFileRemoveCallback(s,i?-1:p,r,true)}}function dir(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);a.mkdir(t,i.mode||g,(function _dirCreated(e){if(e)return s(e);s(null,t,_prepareTmpDirRemoveCallback(t,i,false))}))}))}function dirSync(e){const t=_parseArguments(e),r=t[0];const i=tmpNameSync(r);a.mkdirSync(i,r.mode||g);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,r,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])a.close(e[0],(function(){a.unlink(e[1],_handler)}));else a.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])a.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{a.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,r,a){const i=_prepareRemoveCallback(_removeFileSync,[t,e],a);const s=_prepareRemoveCallback(_removeFileAsync,[t,e],a,i);if(!r.keep)b.unshift(i);return a?i:s}function _prepareTmpDirRemoveCallback(e,t,r){const i=t.unsafeCleanup?n:a.rmdir.bind(a);const s=t.unsafeCleanup?E:y;const p=_prepareRemoveCallback(s,e,r);const o=_prepareRemoveCallback(i,e,r,p);if(!t.keep)b.unshift(p);return r?p:o}function _prepareRemoveCallback(e,t,r,a){let i=false;return function _cleanupCallback(s){if(!i){const p=a||_cleanupCallback;const o=b.indexOf(p);if(o>=0)b.splice(o,1);i=true;if(r||e===y||e===E){return e(t)}else{return e(t,s||function(){})}}}}function _garbageCollector(){if(!S)return;while(b.length){try{b[0]()}catch(e){}}}function _randomChars(e){let t=[],r=null;try{r=p.randomBytes(e)}catch(t){r=p.pseudoRandomBytes(e)}for(var a=0;a<e;a++){t.push(d[r[a]%d.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const r={};for(const t of Object.getOwnPropertyNames(e)){r[t]=e[t]}return[r,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return s.join(t,e.dir,e.name);if(!_isUndefined(e.template))return s.join(t,e.dir,e.template).replace(l,_randomChars(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function _assertAndSanitizeOptions(e){e.tmpdir=_getTmpDir(e);const t=e.tmpdir;if(!_isUndefined(e.name))_assertIsRelative(e.name,"name",t);if(!_isUndefined(e.dir))_assertIsRelative(e.dir,"dir",t);if(!_isUndefined(e.template)){_assertIsRelative(e.template,"template",t);if(!e.template.match(l))throw new Error(`Invalid template, found "${e.template}".`)}if(!_isUndefined(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=_isUndefined(e.name)?e.tries||u:1;e.keep=!!e.keep;e.detachDescriptor=!!e.detachDescriptor;e.discardDescriptor=!!e.discardDescriptor;e.unsafeCleanup=!!e.unsafeCleanup;e.dir=_isUndefined(e.dir)?"":s.relative(t,_resolvePath(e.dir,t));e.template=_isUndefined(e.template)?undefined:s.relative(t,_resolvePath(e.template,t));e.template=_isBlank(e.template)?undefined:s.relative(e.dir,e.template);e.naLine truncated
const a=r(7147);const i=r(2037);const s=r(1017);const p=r(6113);const o={fs:a.constants,os:i.constants};const n=r(4959);const d="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l=/XXXXXX/,u=3,m=(o.O_CREAT||o.fs.O_CREAT)|(o.O_EXCL||o.fs.O_EXCL)|(o.O_RDWR||o.fs.O_RDWR),c=i.platform()==="win32",h=o.EBADF||o.os.errno.EBADF,v=o.ENOENT||o.os.errno.ENOENT,g=448,_=384,w="exit",b=[],y=a.rmdirSync.bind(a),E=n.sync;let S=false;function tmpName(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];try{_assertAndSanitizeOptions(i)}catch(e){return s(e)}let p=i.tries;(function _getUniqueName(){try{const e=_generateTmpName(i);a.stat(e,(function(t){if(!t){if(p-- >0)return _getUniqueName();return s(new Error("Could not get a unique tmp filename, max tries reached "+e))}s(null,e)}))}catch(e){s(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),r=t[0];_assertAndSanitizeOptions(r);let i=r.tries;do{const e=_generateTmpName(r);try{a.statSync(e)}catch(t){return e}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);a.open(t,m,i.mode||_,(function _fileCreated(e,r){if(e)return s(e);if(i.discardDescriptor){return a.close(r,(function _discardCallback(e){return s(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,i,false))}))}else{const e=i.discardDescriptor||i.detachDescriptor;s(null,t,r,_prepareTmpFileRemoveCallback(t,e?-1:r,i,false))}}))}))}function fileSync(e){const t=_parseArguments(e),r=t[0];const i=r.discardDescriptor||r.detachDescriptor;const s=tmpNameSync(r);var p=a.openSync(s,m,r.mode||_);if(r.discardDescriptor){a.closeSync(p);p=undefined}return{name:s,fd:p,removeCallback:_prepareTmpFileRemoveCallback(s,i?-1:p,r,true)}}function dir(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);a.mkdir(t,i.mode||g,(function _dirCreated(e){if(e)return s(e);s(null,t,_prepareTmpDirRemoveCallback(t,i,false))}))}))}function dirSync(e){const t=_parseArguments(e),r=t[0];const i=tmpNameSync(r);a.mkdirSync(i,r.mode||g);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,r,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])a.close(e[0],(function(){a.unlink(e[1],_handler)}));else a.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])a.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{a.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,r,a){const i=_prepareRemoveCallback(_removeFileSync,[t,e],a);const s=_prepareRemoveCallback(_removeFileAsync,[t,e],a,i);if(!r.keep)b.unshift(i);return a?i:s}function _prepareTmpDirRemoveCallback(e,t,r){const i=t.unsafeCleanup?n:a.rmdir.bind(a);const s=t.unsafeCleanup?E:y;const p=_prepareRemoveCallback(s,e,r);const o=_prepareRemoveCallback(i,e,r,p);if(!t.keep)b.unshift(p);return r?p:o}function _prepareRemoveCallback(e,t,r,a){let i=false;return function _cleanupCallback(s){if(!i){const p=a||_cleanupCallback;const o=b.indexOf(p);if(o>=0)b.splice(o,1);i=true;if(r||e===y||e===E){return e(t)}else{return e(t,s||function(){})}}}}function _garbageCollector(){if(!S)return;while(b.length){try{b[0]()}catch(e){}}}function _randomChars(e){let t=[],r=null;try{r=p.randomBytes(e)}catch(t){r=p.pseudoRandomBytes(e)}for(var a=0;a<e;a++){t.push(d[r[a]%d.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const r={};for(const t of Object.getOwnPropertyNames(e)){r[t]=e[t]}return[r,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return s.join(t,e.dir,e.name);if(!_isUndefined(e.template))return s.join(t,e.dir,e.template).replace(l,_randomChars(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.postfix:""].join("");return s.join(t,e.dir,r)}function _assertAndSanitizeOptions(e){e.tmpdir=_getTmpDir(e);const t=e.tmpdir;if(!_isUndefined(e.name))_assertIsRelative(e.name,"name",t);if(!_isUndefined(e.dir))_assertIsRelative(e.dir,"dir",t);if(!_isUndefined(e.template)){_assertIsRelative(e.template,"template",t);if(!e.template.match(l))throw new Error(`Invalid template, found "${e.template}".`)}if(!_isUndefined(e.tries)&&isNaN(e.tries)||e.tries<0)throw new Error(`Invalid tries, found "${e.tries}".`);e.tries=_isUndefined(e.name)?e.tries||u:1;e.keep=!!e.keep;e.detachDescriptor=!!e.detachDescriptor;e.discardDescriptor=!!e.discardDescriptor;e.unsafeCleanup=!!e.unsafeCleanup;e.dir=_isUndefined(e.dir)?"":s.relative(t,_resolvePath(e.dir,t));e.template=_isUndefined(e.template)?undefined:s.relative(t,_resolvePath(e.template,t));e.template=_isBlank(e.template)?undefined:s.relative(e.dir,e.template);e.naLine truncated
//# sourceMappingURL=index.js.map
Generated Vendored
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["../webpack:/docker-build-push/node_modules/@actions/core/lib/command.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/core.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/file-command.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/path-utils.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/summary.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/utils.js","../webpack:/docker-build-push/node_modules/@actions/exec/lib/exec.js","../webpack:/docker-build-push/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/context.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/github.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/internal/utils.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/utils.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/auth.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/index.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/proxy.js","../webpack:/docker-build-push/node_modules/@actions/io/lib/io-util.js","../webpack:/docker-build-push/node_modules/@actions/io/lib/io.js","../webpack:/docker-build-push/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/core/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/docker-build-push/node_modules/balanced-match/index.js","../webpack:/docker-build-push/node_modules/before-after-hook/index.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/add.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/register.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/remove.js","../webpack:/docker-build-push/node_modules/brace-expansion/index.js","../webpack:/docker-build-push/node_modules/concat-map/index.js","../webpack:/docker-build-push/node_modules/deprecation/dist-node/index.js","../webpack:/docker-build-push/node_modules/fs.realpath/index.js","../webpack:/docker-build-push/node_modules/fs.realpath/old.js","../webpack:/docker-build-push/node_modules/glob/common.js","../webpack:/docker-build-push/node_modules/glob/glob.js","../webpack:/docker-build-push/node_modules/glob/sync.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars.runtime.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/base.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/decorators.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/exception.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/helpers.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/helpeLine truncated
{"version":3,"sources":["../webpack:/docker-build-push/node_modules/@actions/core/lib/command.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/core.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/file-command.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/oidc-utils.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/path-utils.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/summary.js","../webpack:/docker-build-push/node_modules/@actions/core/lib/utils.js","../webpack:/docker-build-push/node_modules/@actions/exec/lib/exec.js","../webpack:/docker-build-push/node_modules/@actions/exec/lib/toolrunner.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/context.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/github.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/internal/utils.js","../webpack:/docker-build-push/node_modules/@actions/github/lib/utils.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/auth.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/index.js","../webpack:/docker-build-push/node_modules/@actions/http-client/lib/proxy.js","../webpack:/docker-build-push/node_modules/@actions/io/lib/io-util.js","../webpack:/docker-build-push/node_modules/@actions/io/lib/io.js","../webpack:/docker-build-push/node_modules/@octokit/auth-token/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/core/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/endpoint/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/node_modules/@octokit/request-error/dist-node/index.js","../webpack:/docker-build-push/node_modules/@octokit/request/node_modules/is-plain-object/dist/is-plain-object.js","../webpack:/docker-build-push/node_modules/balanced-match/index.js","../webpack:/docker-build-push/node_modules/before-after-hook/index.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/add.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/register.js","../webpack:/docker-build-push/node_modules/before-after-hook/lib/remove.js","../webpack:/docker-build-push/node_modules/brace-expansion/index.js","../webpack:/docker-build-push/node_modules/concat-map/index.js","../webpack:/docker-build-push/node_modules/deprecation/dist-node/index.js","../webpack:/docker-build-push/node_modules/fs.realpath/index.js","../webpack:/docker-build-push/node_modules/fs.realpath/old.js","../webpack:/docker-build-push/node_modules/glob/common.js","../webpack:/docker-build-push/node_modules/glob/glob.js","../webpack:/docker-build-push/node_modules/glob/sync.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars.runtime.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/base.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/decorators.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/exception.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/helpers.js","../webpack:/docker-build-push/node_modules/handlebars/dist/cjs/handlebars/helpeLine truncated
+5
View File
@@ -28,6 +28,7 @@ export interface Inputs {
load: boolean;
network: string;
noCache: boolean;
noCacheFilters: string[];
outputs: string[];
platforms: string[];
pull: boolean;
@@ -83,6 +84,7 @@ export async function getInputs(defaultContext: string): Promise<Inputs> {
load: core.getBooleanInput('load'),
network: core.getInput('network'),
noCache: core.getBooleanInput('no-cache'),
noCacheFilters: await getInputList('no-cache-filters'),
outputs: await getInputList('outputs', true),
platforms: await getInputList('platforms'),
pull: core.getBooleanInput('pull'),
@@ -141,6 +143,9 @@ async function getBuildArgs(inputs: Inputs, defaultContext: string, buildxVersio
await asyncForEach(inputs.labels, async label => {
args.push('--label', label);
});
await asyncForEach(inputs.noCacheFilters, async noCacheFilter => {
args.push('--no-cache-filter', noCacheFilter);
});
await asyncForEach(inputs.outputs, async output => {
args.push('--output', output);
});
+8
View File
@@ -0,0 +1,8 @@
FROM busybox AS base
RUN echo "Hello world!" > /hello
FROM alpine AS build
COPY --from=base /hello /hello
RUN uname -a
FROM build