Skip to content

Commit

Permalink
Merge pull request #1 from kittaakos/shallwefootballGH-9
Browse files Browse the repository at this point in the history
shallwefootballGH-9: Fixed type errors.
  • Loading branch information
kittaakos authored Jul 2, 2020
2 parents 7ca30b1 + 0ec0dba commit 1592f2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The following settings must be passed as environment variables as shown in the e

## Action outputs

| name | description |
| ------------------ | --------------------------------------------------------------------------------------- |
| `object_key` | Uploaded object key generated by [shortid](https://github.com/dylang/shortid) in Bucket |
| `object_locations` | Object Locations |
| name | description |
| ------------------ | --------------------------------------------------------------------------------------------- |
| `object_key` | Uploaded object key generated by [shortid](https://github.com/dylang/shortid) in Bucket |
| `object_locations` | The URLs of the uploaded objects as a JSON string. E.g: `["location/file1","location/file2"]` |
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
const core = require('@actions/core');
const S3 = require('aws-sdk/clients/s3');
const fs = require('fs');
Expand Down Expand Up @@ -34,7 +35,7 @@ const paths = klawSync(SOURCE_DIR, {
function upload(params) {
return new Promise(resolve => {
s3.upload(params, (err, data) => {
if (err) core.error(err);
if (err) core.error(err.message);
core.info(`uploaded - ${data.Key}`);
core.info(`located - ${data.Location}`);
resolve(data.Location);
Expand Down Expand Up @@ -63,7 +64,7 @@ run()
core.info(`object key - ${objKey}`);
core.info(`object locations - ${locations}`);
core.setOutput('object_key', objKey);
core.setOutput('object_locations', locations);
core.setOutput('object_locations', JSON.stringify(locations));
})
.catch(err => {
core.error(err);
Expand Down

0 comments on commit 1592f2c

Please sign in to comment.