From d47ed37a5a865da9a49774cb07d5ed0cdd749ee9 Mon Sep 17 00:00:00 2001 From: Orie Steele Date: Sat, 10 Aug 2024 12:17:03 -0500 Subject: [PATCH] test --- .github/workflows/ci.yml | 2 +- src/jose/handler.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8254113f..e6c2852a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,6 @@ jobs: uses: ./ with: transmute: | - jose keygen --alg ES256 -v + jose keygen --alg ES256 --verbose - name: Log Private Key run: echo "${{ steps.private_key.outputs.json }}" diff --git a/src/jose/handler.ts b/src/jose/handler.ts index f7363434..a80c11ef 100644 --- a/src/jose/handler.ts +++ b/src/jose/handler.ts @@ -8,7 +8,7 @@ import { env } from '../action' const prettyKey = (k: jose.JWK) => { const { kid, kty, crv, alg, x, y, d } = k - return JSON.stringify({ kid, kty, crv, alg, x, y, d }, null, 2) + return { kid, kty, crv, alg, x, y, d } } export const handler = async function ({ positionals, values }: PositionalArguments) { @@ -27,7 +27,9 @@ export const handler = async function ({ positionals, values }: PositionalArgume } const output = prettyKey(privateKey) if (env.github()) { - setSecret(output) + if (output.d) { + setSecret(output.d) + } setOutput('json', output) } else { console.log(output)