Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node directory and action to upload a file to s3 #14

Merged
merged 2 commits into from
May 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
Loading