Skip to content

Commit dba5a25

Browse files
author
Steve Exley
committed
Full control over S3 key
1 parent 7ecdf2b commit dba5a25

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

index.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,12 @@ try {
99
const inputPath = core.getInput('path');
1010
const inputKey = core.getInput('key');
1111

12-
const key = path.join(
13-
github.context.payload.repository.full_name,
14-
github.context.sha,
15-
inputKey,
16-
);
17-
1812
const stream = fs.createReadStream(inputPath);
1913

2014
AWS.config.update({ region: process.env.AWS_REGION || 'us-east-1' });
2115
s3 = new AWS.S3({ apiVersion: process.env.AWS_API_VERISON || '2006-03-01' });
2216

23-
s3.upload({ Bucket: inputBucket, Key: key, Body: stream }, (err, data) => {
17+
s3.upload({ Bucket: inputBucket, Key: inputKey, Body: stream }, (err, data) => {
2418
if (err) {
2519
throw err;
2620
}

0 commit comments

Comments
 (0)