From 1a116122e65f09d33d3a17b3db88ddbccf68252b Mon Sep 17 00:00:00 2001 From: Ethan Truong Date: Fri, 21 Aug 2026 15:04:42 +0000 Subject: [PATCH 1/2] Update ci-run to allow upload of junit results Signed-off-by: Ethan Truong --- actions/github/run/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/actions/github/run/action.yml b/actions/github/run/action.yml index 4e9c5c738a..3fd44eb92d 100644 --- a/actions/github/run/action.yml +++ b/actions/github/run/action.yml @@ -82,6 +82,12 @@ inputs: upload-path: type: string default: + upload-junit-name: + type: string + default: + upload-junit-path: + type: string + default: warning-match: type: string default: | @@ -376,6 +382,12 @@ runs: with: name: ${{ inputs.upload-name }} path: ${{ startsWith(inputs.upload-path, '/') && inputs.upload-path || format('{0}/{1}', runner.temp, inputs.upload-path) }} + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + name: Upload JUnit XML reports + if: ${{ inputs.upload-junit-name && inputs.upload-junit-path && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} + with: + name: ${{ inputs.upload-junit-name }} + path: ${{ startsWith(inputs.upload-junit-path, '/') && inputs.upload-junit-path || format('{0}/{1}', runner.temp, inputs.upload-junit-path) }} - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee id: upload-failed if: ${{ failure() && inputs.upload-name && inputs.upload-path }} From c62f3fa2dfefed9832d314e9d7fe2828ba110923 Mon Sep 17 00:00:00 2001 From: Ethan Truong Date: Tue, 25 Aug 2026 16:35:28 +0000 Subject: [PATCH 2/2] Add new `uploads` param in a backwards compatible manner Upload step loops through the `uploads` rather than require individually named parameters. Signed-off-by: Ethan Truong --- actions/github/run/action.yml | 79 +++++++++++++++++++++++++++++------ 1 file changed, 66 insertions(+), 13 deletions(-) diff --git a/actions/github/run/action.yml b/actions/github/run/action.yml index 3fd44eb92d..f1c9bbd664 100644 --- a/actions/github/run/action.yml +++ b/actions/github/run/action.yml @@ -88,6 +88,9 @@ inputs: upload-junit-path: type: string default: + uploads: + type: string + default: warning-match: type: string default: | @@ -365,32 +368,82 @@ runs: context: ${{ steps.context.outputs.value }} - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee id: post-failed - if: ${{ failure() && inputs.upload-name && inputs.upload-path }} + if: ${{ failure() && (inputs.uploads || (inputs.upload-name && inputs.upload-path) || (inputs.upload-junit-name && inputs.upload-junit-path)) }} with: input: ${{ steps.context.outputs.value }} filter: | .run["post-steps-failed"] = true - uses: envoyproxy/toolshed/actions/using/steps@ab31cf868faba51af4bd9f04671c30d4084d70ee - name: Post report + name: Run post steps + if: ${{ inputs.steps-post && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} + with: + name: ${{ inputs.steps-post-name }} + steps: ${{ inputs.steps-post }} + context: ${{ steps.context.outputs.value }} + - name: Post report + uses: envoyproxy/toolshed/actions/using/steps@ab31cf868faba51af4bd9f04671c30d4084d70ee if: ${{ inputs.report-post && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} with: steps: ${{ inputs.report-post }} context: ${{ steps.context.outputs.value }} - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - name: Upload artefacts - if: ${{ inputs.upload-name && inputs.upload-path && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} + - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee + name: Generate legacy upload config + if: ${{ inputs.upload-name && inputs.upload-path }} + id: legacy-config with: - name: ${{ inputs.upload-name }} - path: ${{ startsWith(inputs.upload-path, '/') && inputs.upload-path || format('{0}/{1}', runner.temp, inputs.upload-path) }} - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - name: Upload JUnit XML reports - if: ${{ inputs.upload-junit-name && inputs.upload-junit-path && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} + input: | + "${{ inputs.upload-name }}": "${{ inputs.upload-path }}" + input-format: yaml + - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee + name: Generate legacy junit upload config + if: ${{ inputs.upload-junit-name && inputs.upload-junit-path }} + id: legacy-junit-config with: - name: ${{ inputs.upload-junit-name }} - path: ${{ startsWith(inputs.upload-junit-path, '/') && inputs.upload-junit-path || format('{0}/{1}', runner.temp, inputs.upload-junit-path) }} + input: | + "${{ inputs.upload-junit-name }}": "${{ inputs.upload-junit-path }}" + input-format: yaml + - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee + name: Generate upload config + if: ${{ inputs.uploads }} + id: upload-config + with: + input: ${{ inputs.uploads }} + input-format: yaml + - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee + name: Merge upload configs + if: ${{ steps.legacy-config.outputs.value || steps.legacy-junit-config.outputs.value || steps.upload-config.outputs.value }} + id: merged-upload-config + with: + input: | + legacy: ${{ steps.legacy-config.outputs.value || '{}' }} + junit: ${{ steps.legacy-junit-config.outputs.value || '{}' }} + uploads: ${{ steps.upload-config.outputs.value || '{}' }} + input-format: yaml + filter: | + (.legacy + .junit + .uploads) + | with_entries( + .value + |= if type != "string" then + "${{ runner.temp }}/" + elif startswith("/") then + . + else + "${{ runner.temp }}/\(.)" + end) + - uses: envoyproxy/toolshed/actions/foreach@ab31cf868faba51af4bd9f04671c30d4084d70ee + name: Upload artifacts + if: ${{ steps.merged-upload-config.outputs.value && ! (fromJSON(steps.context.outputs.value).run.cancelled || cancelled()) }} + with: + items: ${{ steps.merged-upload-config.outputs.value }} + steps: | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: $KEY + path: >- + %{{ fromJSON(inputs.context).items['$KEY'] }} - uses: envoyproxy/toolshed/actions/jq@ab31cf868faba51af4bd9f04671c30d4084d70ee id: upload-failed - if: ${{ failure() && inputs.upload-name && inputs.upload-path }} + if: ${{ failure() && (inputs.uploads || (inputs.upload-name && inputs.upload-path) || (inputs.upload-junit-name && inputs.upload-junit-path)) }} with: input: ${{ steps.post-failed.outputs.value || steps.context.outputs.value }} filter: |