diff --git a/actions/add-runtime-custom-property/action.cjs b/actions/add-runtime-custom-property/action.cjs index 70356b7f..07c7e4e0 100644 --- a/actions/add-runtime-custom-property/action.cjs +++ b/actions/add-runtime-custom-property/action.cjs @@ -15,7 +15,7 @@ module.exports = async ({ github, context, inputs, actionPath, core, debug = fal if (inputs.runtime_directory) { const repositories = await kubeGetRepositories({ - directory: inputs.runtime_directories, + directory: inputs.runtime_directory, orgFilter: new RegExp(`^${org}$`), debug }) @@ -23,6 +23,7 @@ module.exports = async ({ github, context, inputs, actionPath, core, debug = fal await updateRuntimeProperty({ github, org, + core, runtime: 'bsg', repositories, debug diff --git a/src/updateRuntimeProperty.js b/src/updateRuntimeProperty.js index 6e9027f9..f24923f7 100644 --- a/src/updateRuntimeProperty.js +++ b/src/updateRuntimeProperty.js @@ -4,7 +4,8 @@ export default async function updateRuntimeProperty ({ debug = false, repositories, runtime, - org + org, + core }) { if (!github && githubToken) { const { Octokit } = await import('octokit') @@ -39,7 +40,11 @@ export default async function updateRuntimeProperty ({ } for (const repo of repositories) { - if (debug) { console.log(`updating runtime property for ${repo.org}/${repo.repo}`) } + if (debug) { console.log('updating runtime property') } + if (core) { + core.setSecret(repo.org) + core.setSecret(repo.name) + } await github.request('PATCH /orgs/{org}/properties/values', { org: repo.org,