From 03c503a952b12740b24b5d99b118b794885ff17c Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Wed, 4 Feb 2026 13:38:09 +0100 Subject: [PATCH 1/3] Add condition to upload XML int test reports on push only --- .github/workflows/e2e-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index f1dc6e9..d4c03c0 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -47,7 +47,7 @@ jobs: LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} - name: Upload test results - if: always() + if: always() && github.event_name == 'push' run: | cp hack/*_go_metadata_test_report.xml . filename=$(ls | grep -E '^[0-9]{12}_go_metadata_test_report\.xml$') From 355bff68c9b02205b5682909c1c826470a78db0f Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 13:16:45 +0100 Subject: [PATCH 2/3] Add option to upload test report for manual runs on demand only --- .github/workflows/e2e-test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index d4c03c0..28b86bf 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -6,6 +6,11 @@ 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: boolean + required: false + default: false push: branches: - main @@ -47,7 +52,7 @@ jobs: LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} - name: Upload test results - if: always() && github.event_name == 'push' + if: ${{ always() && github.repository == 'linode/go-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) }} run: | cp hack/*_go_metadata_test_report.xml . filename=$(ls | grep -E '^[0-9]{12}_go_metadata_test_report\.xml$') From 980ece70df5499096876f3b657364344c6a20c16 Mon Sep 17 00:00:00 2001 From: Maciej Wilk Date: Mon, 9 Feb 2026 17:06:40 +0100 Subject: [PATCH 3/3] Set test_upload_report to choice type as it is unequivocal --- .github/workflows/e2e-test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 28b86bf..1bc9fad 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -8,9 +8,12 @@ on: required: true test_report_upload: description: 'Indicates whether to upload the test report to object storage. Defaults to "false"' - type: boolean + type: choice required: false - default: false + default: 'false' + options: + - 'true' + - 'false' push: branches: - main @@ -52,7 +55,7 @@ jobs: LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }} - name: Upload test results - if: ${{ always() && github.repository == 'linode/go-metadata' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.test_report_upload)) }} + 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$')