Skip to content

Commit 9856794

Browse files
v2.3.0
1 parent 3cadc8d commit 9856794

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

dist/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,16 @@ function runAction(context) {
146146
return __awaiter(this, void 0, void 0, function* () {
147147
yield forceUseCache(context);
148148
const serviceNameArgs = serviceNameArgsArray(context);
149-
yield runCompose('pull', serviceNameArgs, context);
149+
try {
150+
yield runCompose('pull', serviceNameArgs, context);
151+
}
152+
catch (e) {
153+
if (!context.build) {
154+
core.error('Error running docker-compose pull and the action is not configured to build the image.');
155+
throw new ComposeError(`docker-compose pull failed and not allowed to build`, null);
156+
}
157+
core.warning('Error running docker-compose pull. The image will be rebuilt.');
158+
}
150159
if (context.build) {
151160
yield runCompose('build', [...context.buildArgs, ...serviceNameArgs], context);
152161
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docker-compose-action",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": true,
55
"description": "Run docker-compose and enforce cleanup after the job finished",
66
"main": "lib/main.js",

0 commit comments

Comments
 (0)