Skip to content

Commit f4aa82b

Browse files
fix: load action boundary catalogs from runtime env paths
1 parent f63f72d commit f4aa82b

3 files changed

Lines changed: 43 additions & 49 deletions

File tree

.github/workflows/prism-gate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
BOOTSTRAP_LOCK_PATH: ".prism/bootstrap.lock"
3838
MEANING_OUT_PATH: "out/meaning.json"
3939
MUTATION_REPORT_OUT_PATH: "out/mutation_report.json"
40+
ACTOR_CATALOG_PATH: "boundary/github-action/catalogs/actor-profiles.default.v1.json"
41+
SIGNAL_CATALOG_PATH: "boundary/github-action/catalogs/signal-surfaces.default.v1.json"
4042

4143
- name: Upload meaning artifact
4244
if: always()

boundary/github-action/src/runActionBoundary.js

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -559,35 +559,25 @@ function emitActionDecisionArtifact(input) {
559559
function runActionBoundary() {
560560
const repoRoot = process.cwd();
561561

562-
const actorCatalogFile = [
563-
"actor-profiles",
564-
"default",
565-
"v1",
566-
"json",
567-
].join(".");
568-
569-
const signalCatalogFile = [
570-
"signal-surfaces",
571-
"default",
572-
"v1",
573-
"json",
574-
].join(".");
575-
576-
const actorCatalogPath = path.resolve(
577-
repoRoot,
578-
"boundary",
579-
"github-action",
580-
"catalogs",
581-
actorCatalogFile
582-
);
583-
584-
const signalCatalogPath = path.resolve(
585-
repoRoot,
586-
"boundary",
587-
"github-action",
588-
"catalogs",
589-
signalCatalogFile
590-
);
562+
const actorCatalogPath = process.env.ACTOR_CATALOG_PATH
563+
? path.resolve(repoRoot, process.env.ACTOR_CATALOG_PATH)
564+
: path.resolve(
565+
repoRoot,
566+
"boundary",
567+
"github-action",
568+
"catalogs",
569+
"actor-profiles.default.v1.json"
570+
);
571+
572+
const signalCatalogPath = process.env.SIGNAL_CATALOG_PATH
573+
? path.resolve(repoRoot, process.env.SIGNAL_CATALOG_PATH)
574+
: path.resolve(
575+
repoRoot,
576+
"boundary",
577+
"github-action",
578+
"catalogs",
579+
"signal-surfaces.default.v1.json"
580+
);
591581

592582
const actorCatalog = readJson(actorCatalogPath);
593583
const signalCatalog = readJson(signalCatalogPath);

dist/index.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -883,26 +883,28 @@ function emitActionDecisionArtifact(input) {
883883
function runActionBoundary() {
884884
const repoRoot = process.cwd();
885885

886-
const actorCatalogFile = [
887-
"actor-profiles",
888-
"default",
889-
"v1",
890-
"json",
891-
].join(".");
892-
893-
const signalCatalogFile = [
894-
"signal-surfaces",
895-
"default",
896-
"v1",
897-
"json",
898-
].join(".");
899-
900-
const actorCatalogPath = __nccwpck_require__.ab + "actor-profiles.default.v1.json";
901-
902-
const signalCatalogPath = __nccwpck_require__.ab + "signal-surfaces.default.v1.json";
903-
904-
const actorCatalog = readJson(__nccwpck_require__.ab + "actor-profiles.default.v1.json");
905-
const signalCatalog = readJson(__nccwpck_require__.ab + "signal-surfaces.default.v1.json");
886+
const actorCatalogPath = process.env.ACTOR_CATALOG_PATH
887+
? path.resolve(repoRoot, process.env.ACTOR_CATALOG_PATH)
888+
: path.resolve(
889+
repoRoot,
890+
"boundary",
891+
"github-action",
892+
"catalogs",
893+
"actor-profiles.default.v1.json"
894+
);
895+
896+
const signalCatalogPath = process.env.SIGNAL_CATALOG_PATH
897+
? path.resolve(repoRoot, process.env.SIGNAL_CATALOG_PATH)
898+
: path.resolve(
899+
repoRoot,
900+
"boundary",
901+
"github-action",
902+
"catalogs",
903+
"signal-surfaces.default.v1.json"
904+
);
905+
906+
const actorCatalog = readJson(actorCatalogPath);
907+
const signalCatalog = readJson(signalCatalogPath);
906908

907909
ensureCatalogShape(actorCatalog, "actors");
908910
ensureCatalogShape(signalCatalog, "surfaces");

0 commit comments

Comments
 (0)