mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-26 22:26:08 +08:00
docker: fix pull caching
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
43d331f793
commit
4d8bd68c1c
@ -136,8 +136,8 @@ export class Docker {
|
|||||||
await Exec.getExecOutput(`docker`, ['pull', image], {
|
await Exec.getExecOutput(`docker`, ['pull', image], {
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
pulled = false;
|
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
pulled = false;
|
||||||
const err = res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error';
|
const err = res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error';
|
||||||
if (cacheFoundPath) {
|
if (cacheFoundPath) {
|
||||||
core.warning(`Failed to pull image, using one from cache: ${err}`);
|
core.warning(`Failed to pull image, using one from cache: ${err}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user