Skip to content

Commit 4c9b8cc

Browse files
committed
feat: set websiteUrl as output
1 parent b08fab9 commit 4c9b8cc

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

dist/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7783,6 +7783,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
77837783
Object.defineProperty(exports, "__esModule", { value: true });
77847784
exports.requiredEnvVars = void 0;
77857785
const github = __importStar(__webpack_require__(469));
7786+
const githubCore = __importStar(__webpack_require__(470));
77867787
const s3Client_1 = __importDefault(__webpack_require__(882));
77877788
const s3UploadDirectory_1 = __importDefault(__webpack_require__(704));
77887789
const validateEnvVars_1 = __importDefault(__webpack_require__(732));
@@ -7823,6 +7824,7 @@ exports.default = (bucketName, uploadDirectory, environmentPrefix) => __awaiter(
78237824
console.log("Uploading files...");
78247825
yield s3UploadDirectory_1.default(bucketName, uploadDirectory);
78257826
yield githubClient_1.default.repos.createDeploymentStatus(Object.assign(Object.assign({}, repo), { deployment_id: deployment.data.id, state: "success", environment_url: websiteUrl }));
7827+
githubCore.setOutput('websiteUrl', websiteUrl);
78267828
console.log(`Website URL: ${websiteUrl}`);
78277829
}
78287830
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "s3-website-pr-action",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "",
55
"scripts": {
66
"start": "ncc run src/index.ts",

src/actions/prUpdatedAction.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as github from "@actions/github";
2+
import * as githubCore from '@actions/core';
23
import S3 from "../s3Client";
34
import s3UploadDirectory from "../utils/s3UploadDirectory";
45
import validateEnvVars from "../utils/validateEnvVars";
@@ -68,6 +69,8 @@ export default async (bucketName: string, uploadDirectory: string, environmentPr
6869
environment_url: websiteUrl,
6970
});
7071

72+
githubCore.setOutput('websiteUrl', websiteUrl);
73+
7174
console.log(`Website URL: ${websiteUrl}`);
7275
}
7376
};

0 commit comments

Comments
 (0)