Denys Vuika 36c5c39311
[ACS-4535] rework docker publishing actions (#3068)
* rework docker publishing actions

* simplify steps

* rollback AWS credentials
2023-03-16 13:26:45 -04:00

41 lines
1.2 KiB
YAML

name: "Upload build artifacts"
description: "Upload build artifacts"
inputs:
artifact:
description: 'path to the artifact to archieve (tar.bz2) and upload (like ./dist)'
required: true
type: string
output:
description: 'the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2'
required: true
type: string
aws-access-key-id:
description: 'aws access key id'
required: true
type: string
aws-secret-access-key:
description: 'aws secret access key'
required: true
type: string
aws-region:
description: 'aws region'
required: true
type: string
runs:
using: "composite"
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
- name: upload build artifacts to s3
shell: bash
run: |
tar cvfj ./s3-artifact.tmp -C ${{ inputs.artifact }} `ls ${{ inputs.artifact }}`
aws s3 cp ./s3-artifact.tmp ${{ inputs.output }}
rm ./s3-artifact.tmp