woocommerce/.github/actions/tests/upload-allure-files-to-bucket/action.yml

58 lines
1.9 KiB
YAML

name: Upload Allure files to bucket
description: Upload Allure files to bucket.
permissions: {}
inputs:
destination-dir:
description: Directory under the "artifacts" S3 folder to which the Allure files would be uploaded.
required: true
aws-region:
required: true
aws-access-key-id:
required: true
aws-secret-access-key:
required: true
s3-bucket:
required: true
include-allure-results:
dafault: false
allure-results-dir:
description: Path to the allure-results folder
default: ${{ env.ALLURE_RESULTS_DIR }}
required: true
allure-report-dir:
description: Path to the allure-report folder
default: ${{ env.ALLURE_REPORT_DIR }}
required: true
runs:
using: composite
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: ${{ inputs.aws-region }}
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
- name: Upload 'allure-results' folder
if: inputs.include-allure-results == true
shell: bash
run: |
echo "Uploading allure-results folder..."
aws s3 cp ${{ inputs.allure-results-dir }} \
${{ inputs.s3-bucket }}/artifacts/${{ github.run_id }}/${{ inputs.destination-dir }}/allure-results \
--recursive \
--quiet
echo "Done"
- name: Upload 'allure-report' folder
shell: bash
run: |
echo "Uploading allure-report folder..."
aws s3 cp ${{ inputs.allure-report-dir }} \
${{ inputs.s3-bucket }}/artifacts/${{ github.run_id }}/${{ inputs.destination-dir }}/allure-report \
--recursive \
--quiet
echo "Done"