From 68f61eeb30cef44c222def940bed6d99a08dafe7 Mon Sep 17 00:00:00 2001 From: Jan Max Tiedemann Date: Wed, 27 Nov 2024 01:36:11 +0100 Subject: [PATCH] fix: now there is javascript --- actions/gcp-gsm-load-secrets/action.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/actions/gcp-gsm-load-secrets/action.yaml b/actions/gcp-gsm-load-secrets/action.yaml index 5acff86dd..3ee421a48 100644 --- a/actions/gcp-gsm-load-secrets/action.yaml +++ b/actions/gcp-gsm-load-secrets/action.yaml @@ -41,7 +41,10 @@ runs: secrets: ${{ steps.parse_secrets.outputs.secrets-list }} export_to_environment: ${{ inputs.export-to-environment }} - name: "Set outputs" - run: | - for secret in $(echo "${{ steps.parse_secrets.outputs.secret-names }}" | sed "s/,/ /g"); do - echo "${secret}=${{ steps.secrets.outputs.${secret} }}" >> $GITHUB_OUTPUT - done + uses: "actions/github-script@v7" + with: + script: | + const secrets = JSON.parse('${{ toJSON(steps.secrets.outputs) }}'); + for (const [key, value] of Object.entries(secrets)) { + core.setOutput(key, value); + }