Skip to content

Commit d541c80

Browse files
authored
Align GHA workflows in the scope of report uploads (#132)
* Add condition to upload XML int test reports on push only * Add option to upload test report for manual runs on demand only * Set test_upload_report to choice type as it is unequivocal
1 parent ae1a0b0 commit d541c80

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/e2e-test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
commit_sha:
77
description: 'The hash value of the commit.'
88
required: true
9+
test_report_upload:
10+
description: 'Indicates whether to upload the test report to object storage. Defaults to "false"'
11+
type: choice
12+
required: false
13+
default: 'false'
14+
options:
15+
- 'true'
16+
- 'false'
917
push:
1018
branches:
1119
- main
@@ -47,7 +55,7 @@ jobs:
4755
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}
4856

4957
- name: Upload test results
50-
if: always()
58+
if: always() && github.repository == 'linode/go-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload == 'true'))
5159
run: |
5260
cp hack/*_go_metadata_test_report.xml .
5361
filename=$(ls | grep -E '^[0-9]{12}_go_metadata_test_report\.xml$')

0 commit comments

Comments
 (0)