Skip to content

Commit

Permalink
Add node directory and action to upload a file to s3 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed May 30, 2024
1 parent 030c543 commit 5529bd4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions node/publish_asset_to_s3/action.yml
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 }}

0 comments on commit 5529bd4

Please sign in to comment.