-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add node directory and action to upload a file to s3 (#14)
- Loading branch information
1 parent
030c543
commit 5529bd4
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
name: Publish Release Asset to S3 | ||
description: "Publish Asset to S3" | ||
inputs: | ||
version: | ||
description: "The published version" | ||
required: true | ||
product_name: | ||
description: "The name of the product" | ||
required: true | ||
file: | ||
description: file to upload | ||
required: true | ||
dry_run: | ||
description: "Whether this is a dry run" | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Run publish script | ||
shell: bash | ||
run: | | ||
set -eux | ||
if [ "$DRY_RUN" == "false" ]; then | ||
echo "Uploading Release Reports" | ||
TARGET=s3://${AWS_BUCKET}/${PRODUCT_NAME}/${VERSION}/${FILE} | ||
aws s3 cp $FILE $TARGET | ||
else | ||
echo "Dry run, not uploading to S3 or creating GitHub Release" | ||
echo "Would upload $FILE" | ||
cat $FILE | ||
fi | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
PRODUCT_NAME: ${{ inputs.product_name }} | ||
DRY_RUN: ${{ inputs.dry_run }} | ||
FILE: ${{ inputs.file }} |