Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
manquer committed Sep 16, 2024
2 parents 9e73759 + f96424e commit 435cf7d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
AZURE_TENANT_ID: 5a7d1f14-292f-4043-a73a-d0339418a1e1
AZURE_VAULT_URI: https://tvkv-dev-top-01.vault.azure.net/
- name: check
run: echo $ TEST_KEY
run: echo $TEST_KEY
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82108,6 +82108,7 @@ class KeyVaultClient {
core.info(`fetching... ${k}`);
const secret = await this.#client.getSecret(`${prefix}-${k}`);
value = (0,lodash.get)(secret, 'value');
core.info(value);
if (!value)
throw new Error(`Secret ${k} not found in service ${prefix}`);
this.#keys = (0,lodash.set)(this.#keys, key, value);
Expand All @@ -82129,7 +82130,6 @@ async function setup(prefix) {
return `\n${key}=${value}`;
});
const env = (0,lodash.reduce)(res, (acc, i) => `${acc}${i}`);
console.log(env);
const current = process.env.GITHUB_ENV;
process.env.GITHUB_ENV = `${current}${env}`;
}
Expand Down
1 change: 1 addition & 0 deletions src/env.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { reduce, filter, startsWith } from 'lodash'
import { PromiseExtended } from './promise'
import Kv from './kv'

export async function setup(prefix: string): Promise<void> {
const items = filter(Object.keys(process.env), (i: string) => startsWith(i, `${prefix}_`))
const res = await PromiseExtended.map(items, async (k: string): Promise<string> => {
Expand Down
1 change: 1 addition & 0 deletions src/kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class KeyVaultClient {
core.info(`fetching... ${k}`)
const secret: KeyVaultSecret = await this.#client.getSecret(`${prefix}-${k}`)
value = get(secret, 'value')
core.info(value)
if (!value) throw new Error(`Secret ${k} not found in service ${prefix}`)
this.#keys = set(this.#keys, key, value)
}
Expand Down

0 comments on commit 435cf7d

Please sign in to comment.