diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index f1dc6e9..1bc9fad 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -6,6 +6,14 @@ on: commit_sha: description: 'The hash value of the commit.' required: true + test_report_upload: + description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' + type: choice + required: false + default: 'false' + options: + - 'true' + - 'false' push: branches: - main @@ -47,7 +55,7 @@ jobs: LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} - name: Upload test results - if: always() + if: always() && github.repository == 'linode/go-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true')) run: | cp hack/*_go_metadata_test_report.xml . filename=$(ls | grep -E '^[0-9]{12}_go_metadata_test_report\.xml$')