Skip to content

Commit

Permalink
Merge pull request #2 from fabscale/update-dependencies
Browse files Browse the repository at this point in the history
Ensure deployment works again
  • Loading branch information
valado authored May 13, 2022
2 parents 2b0bd1a + d6d7665 commit 076c823
Show file tree
Hide file tree
Showing 879 changed files with 469,579 additions and 126,088 deletions.
35 changes: 18 additions & 17 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// const github = require('@actions/github');
const core = require("@actions/core");
const fs = require("fs");
const AWS = require("aws-sdk");

try {
async function run() {
// Get all parameters
const ZIP = core.getInput("ZIP");
const FUNCTION_NAME = core.getInput("FUNCTION_NAME");
Expand Down Expand Up @@ -56,12 +55,7 @@ try {
ZipFile: zipBuffer,
};

lambda.updateFunctionCode(uploadParams, (err) => {
if (!!err) {
core.error(error.message);
core.setFailed(err);
}
});
await lambda.updateFunctionCode(uploadParams).promise();

let configParams = {
FunctionName: FUNCTION_NAME,
Expand Down Expand Up @@ -90,14 +84,21 @@ try {
}

if (Object.keys(configParams).length > 1) {
lambda.updateFunctionConfiguration(configParams, (err) => {
if (!!err) {
core.error(error.message);
core.setFailed(err);
}
});
await lambda
.waitFor("functionUpdated", {
FunctionName: FUNCTION_NAME,
})
.promise();

await lambda.updateFunctionConfiguration(configParams).promise();
}
} catch (error) {
core.error(error.message);
core.setFailed(error.message);
}

(async function () {
try {
await run();
} catch (error) {
core.error(error.message);
core.setFailed(error.message);
}
})();
146 changes: 146 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 076c823

Please sign in to comment.