Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon committed Jun 14, 2024
1 parent 8c1e687 commit 931a9db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion actions/add-runtime-custom-property/action.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ 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
})

await updateRuntimeProperty({
github,
org,
core,
runtime: 'bsg',
repositories,
debug
Expand Down
9 changes: 7 additions & 2 deletions src/updateRuntimeProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export default async function updateRuntimeProperty ({
debug = false,
repositories,
runtime,
org
org,
core
}) {
if (!github && githubToken) {
const { Octokit } = await import('octokit')
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 931a9db

Please sign in to comment.