File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ inputs:
13
13
description : The deployment mode (default / rollback / unblock)
14
14
required : false
15
15
default : ' default'
16
+ custom_hash :
17
+ required : false
18
+ description : ' Custom hash of the deployment'
16
19
outputs :
17
20
tree_hash :
18
21
description : The tree hash of the performed deployment
Original file line number Diff line number Diff line change @@ -24312,8 +24312,10 @@ runAction(async () => {
24312
24312
const bucket = core2.getInput("bucket_name", { required: true });
24313
24313
const deployModeInput = core2.getInput("deploy_mode", { required: true });
24314
24314
const rollbackCommitHash = core2.getInput("rollback_commit_hash");
24315
+ const customHash = core2.getInput("custom_hash");
24315
24316
const output = await cursorDeploy({
24316
24317
bucket,
24318
+ customHash,
24317
24319
deployModeInput,
24318
24320
rollbackCommitHash,
24319
24321
ref: ((_b = (_a2 = github.context.payload) == null ? void 0 : _a2.pull_request) == null ? void 0 : _b.head.ref) ?? github.context.ref
@@ -24324,12 +24326,14 @@ runAction(async () => {
24324
24326
async function cursorDeploy({
24325
24327
ref,
24326
24328
bucket,
24329
+ // NOTE: Using custom hash for deployment doesn't work will the rollback/unblock workflows
24330
+ customHash,
24327
24331
deployModeInput,
24328
24332
rollbackCommitHash
24329
24333
}) {
24330
24334
const deployMode = getDeployMode(deployModeInput);
24331
24335
const branchLabel = branchNameToHostnameLabel(ref);
24332
- const treeHash = await getDeploymentHash(deployMode, rollbackCommitHash);
24336
+ const treeHash = customHash ?? await getDeploymentHash(deployMode, rollbackCommitHash);
24333
24337
const rollbackKey = `rollbacks/${branchLabel}`;
24334
24338
const deployKey = `deploys/${branchLabel}`;
24335
24339
if (deployMode === "default" || deployMode === "unblock") {
Original file line number Diff line number Diff line change @@ -27,9 +27,11 @@ runAction(async () => {
27
27
const bucket = core . getInput ( 'bucket_name' , { required : true } )
28
28
const deployModeInput = core . getInput ( 'deploy_mode' , { required : true } )
29
29
const rollbackCommitHash = core . getInput ( 'rollback_commit_hash' )
30
+ const customHash = core . getInput ( 'custom_hash' )
30
31
31
32
const output = await cursorDeploy ( {
32
33
bucket,
34
+ customHash,
33
35
deployModeInput,
34
36
rollbackCommitHash,
35
37
ref : github . context . payload ?. pull_request ?. head . ref ?? github . context . ref
@@ -42,19 +44,22 @@ runAction(async () => {
42
44
interface CursorDeployActionArgs {
43
45
bucket : string
44
46
deployModeInput : string
47
+ customHash ?: string
45
48
rollbackCommitHash : string
46
49
ref : string
47
50
}
48
51
49
52
export async function cursorDeploy ( {
50
53
ref,
51
54
bucket,
55
+ // NOTE: Using custom hash for deployment doesn't work will the rollback/unblock workflows
56
+ customHash,
52
57
deployModeInput,
53
58
rollbackCommitHash
54
59
} : CursorDeployActionArgs ) {
55
60
const deployMode = getDeployMode ( deployModeInput )
56
61
const branchLabel = branchNameToHostnameLabel ( ref )
57
- const treeHash = await getDeploymentHash ( deployMode , rollbackCommitHash )
62
+ const treeHash = customHash ?? ( await getDeploymentHash ( deployMode , rollbackCommitHash ) )
58
63
59
64
const rollbackKey = `rollbacks/${ branchLabel } `
60
65
const deployKey = `deploys/${ branchLabel } `
You can’t perform that action at this time.
0 commit comments