Denys Vuika c3b9886edf
cleanup GitHub actions (#3071)
* cleanup GHA

* remove unused parameters

* consolidate actions, improve readability

* remove unused files

* restore fetch depth
2023-03-22 12:48:53 -04:00

46 lines
1.3 KiB
YAML

name: "Download build artifacts"
description: "Download build artifacts"
inputs:
artifact:
description: 'path to the s3 artifact (tar.bz2) to download and extract'
required: true
type: string
output:
description: 'directory to extract the archive to'
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@v2
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: Download build artifacts from s3
shell: bash
run: |
test ! -d ${{ inputs.output }} && mkdir -p ${{ inputs.output }}
aws s3 cp ${{ inputs.artifact }} ./s3-artifact.tmp
echo 'artifact download done'
tar -xvf ./s3-artifact.tmp -C ${{ inputs.output }} >&/dev/null
echo 'tar the artifact done'
rm ./s3-artifact.tmp
echo 'remove tmp file'