From eef749eb7d449b7d0352b04cccb43f9ceb26a80b Mon Sep 17 00:00:00 2001 From: John Andersen Date: Fri, 15 Dec 2023 06:37:15 -0800 Subject: [PATCH 1/2] Set vexctl generate output as action output Signed-off-by: John Andersen --- action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 2abd7cf..d01e2c6 100644 --- a/action.yaml +++ b/action.yaml @@ -21,11 +21,16 @@ inputs: file: description: 'Path to the file where the OpenVEX document will be written' required: false +outputs: + openvex: + description: "Generated OpenVEX document" + value: ${{ steps.generate.outputs.openvex }} runs: using: "composite" steps: - uses: openvex/setup-vexctl@e85ca48f3c8a376289f6476129d59cda82147e71 # v0.1.1 - shell: bash + id: generate run: | #!/bin/bash @@ -37,4 +42,6 @@ runs: alias log_error="echo \"ERROR:\"" fi - vexctl generate "${{ inputs.product }}" --file="${{ inputs.file }}" --templates="${{ inputs.templates-dir }}" + echo "openvex<> $GITHUB_OUTPUT + vexctl generate "${{ inputs.product }}" --file="${{ inputs.file }}" --templates="${{ inputs.templates-dir }}" | tee -a $GITHUB_OUTPUT + echo "GITHUB_OUTPUT_EOF" >> $GITHUB_OUTPUT From 159b7ee4845fb48f1991395ce8501d6263407360 Mon Sep 17 00:00:00 2001 From: John Andersen Date: Fri, 15 Dec 2023 06:42:45 -0800 Subject: [PATCH 2/2] Set default file output to stdout Signed-off-by: John Andersen --- action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yaml b/action.yaml index d01e2c6..89b95bb 100644 --- a/action.yaml +++ b/action.yaml @@ -21,6 +21,7 @@ inputs: file: description: 'Path to the file where the OpenVEX document will be written' required: false + default: '/dev/stdout' outputs: openvex: description: "Generated OpenVEX document"