forked from aws-actions/aws-codebuild-run-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (24 loc) · 752 Bytes
/
index.js
File metadata and controls
29 lines (24 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const core = require("@actions/core");
const { runDeploy } = require("./code-build");
const assert = require("assert");
/* istanbul ignore next */
if (require.main === module) {
run();
}
module.exports = run;
async function run() {
console.log("*****STARTING CODEDEPLOY*****");
try {
const deployment = await runDeploy();
core.setOutput("aws-deployment-id", deployment.status);
// Signal the outcome
assert(true, "Deployment succeeded");
} catch (error) {
console.log("error", error);
core.setFailed(`Message : ${error.message}`);
} finally {
console.log("*****CODEDEPLOY COMPLETE*****");
}
}