From f9e143c52af639f9d1c07c576a4f2cbc57a73359 Mon Sep 17 00:00:00 2001 From: Kay Date: Thu, 16 May 2024 08:25:12 +1000 Subject: [PATCH] Added test-add-mask-secret (#62) --- .github/workflows/test-add-mask-secret.yaml | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test-add-mask-secret.yaml diff --git a/.github/workflows/test-add-mask-secret.yaml b/.github/workflows/test-add-mask-secret.yaml new file mode 100644 index 0000000..df91150 --- /dev/null +++ b/.github/workflows/test-add-mask-secret.yaml @@ -0,0 +1,33 @@ +name: test-add-mask-secret +# run-name: "Env: ${{ inputs.env }} Secret Name: ${{ inputs.secret_name }} @ ${{ github.ref_name }}" + +on: + workflow_dispatch: + inputs: + secret_name: + description: Secret Name + required: true + type: string + secret_value: + description: Secret Value + required: true + type: string + +defaults: + run: + shell: bash + +env: + SECRET_NAME: ${{ inputs.secret_name }} + +jobs: + update: + runs-on: ubuntu-latest + steps: + - name: Mask + run: | + SECRET_VALUE=$(jq -r '.inputs.secret_value' $GITHUB_EVENT_PATH) + echo ::add-mask::$SECRET_VALUE + echo SECRET_VALUE=$SECRET_VALUE >> $GITHUB_ENV + + - run: echo $SECRET_VALUE