Skip to content

Commit 0b39c8e

Browse files
committed
feat: add app-registry-file input to ocis-setup action
Allows callers to supply a custom app-registry.yaml before oCIS starts, replacing the built-in FakeOffice-only default. This avoids the need for a post-startup oCIS restart to load office-suite MIME type registrations.
1 parent d37af70 commit 0b39c8e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎ocis-setup/action.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ inputs:
107107
description: Path (relative to repo root) to the Keycloak realm dist JSON; only used when keycloak=true
108108
required: false
109109
default: tests/config/ci/ocis-ci-realm.dist.json
110+
app-registry-file:
111+
description: Path (relative to repo root) to a custom app-registry.yaml; replaces the built-in default before oCIS starts
112+
required: false
113+
default: ""
110114

111115
outputs:
112116
ocis-url:
@@ -385,6 +389,7 @@ runs:
385389
OCIS_ACTION_PATH: ${{ github.action_path }}
386390
OCIS_URL: ${{ inputs.ocis-url }}
387391
OCIS_CONFIG_DIR_INPUT: ${{ inputs.ocis-config-dir }}
392+
APP_REGISTRY_FILE_INPUT: ${{ inputs.app-registry-file }}
388393
run: "${OCIS_ACTION_PATH}/scripts/init-ocis.sh"
389394

390395
# -------------------------------------------------------------------------

‎ocis-setup/scripts/init-ocis.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ mkdir -p "$CONFIG_DIR"
66

77
OCIS_URL="${OCIS_URL:-https://localhost:9200}" OCIS_CONFIG_DIR="$CONFIG_DIR" ocis init --insecure true
88

9-
cp "${OCIS_ACTION_PATH}/config/app-registry.yaml" "${CONFIG_DIR}/app-registry.yaml"
9+
if [[ -n "${APP_REGISTRY_FILE_INPUT:-}" ]]; then
10+
cp "${GITHUB_WORKSPACE}/${APP_REGISTRY_FILE_INPUT}" "${CONFIG_DIR}/app-registry.yaml"
11+
else
12+
cp "${OCIS_ACTION_PATH}/config/app-registry.yaml" "${CONFIG_DIR}/app-registry.yaml"
13+
fi
1014

1115
echo "oCIS config initialized at ${CONFIG_DIR}"

0 commit comments

Comments
 (0)