diff --git a/.github/actions/arcane-deploy/action.sh b/.github/actions/arcane-deploy/action.sh index f6770bc..82d16b4 100755 --- a/.github/actions/arcane-deploy/action.sh +++ b/.github/actions/arcane-deploy/action.sh @@ -16,7 +16,6 @@ AUTO_SYNC="${INPUT_AUTO_SYNC:-true}" SYNC_INTERVAL="${INPUT_SYNC_INTERVAL:-5}" TRIGGER_SYNC="${INPUT_TRIGGER_SYNC:-true}" ENV_VARS="${INPUT_ENV_VARS:-}" -SYNC_NAME_PREFIX="${INPUT_SYNC_NAME_PREFIX:-${GITHUB_REPOSITORY##*/}}" # [C1/C2] Mask secrets immediately, before any logging or API calls [[ -n "${API_KEY}" ]] && echo "::add-mask::${API_KEY}" @@ -167,25 +166,18 @@ discover_compose_files() { # --- Sync Naming --- # Derive a sync name from a compose file path. -# "stacks/myapp/compose.yml" -> "${prefix}-myapp" -# "compose.yml" (root) -> "${prefix}" +# "stacks/myapp/compose.yml" -> "myapp" +# "compose.yml" (root) -> "root" sync_name_from_path() { local path="$1" local dir dir=$(dirname "${path}") - local name if [[ "${dir}" == "." ]]; then - name="${SYNC_NAME_PREFIX}" + echo "root" else - name=$(basename "${dir}") - # Avoid "prefix-prefix" when the directory name matches the prefix - if [[ "${name}" != "${SYNC_NAME_PREFIX}" ]]; then - name="${SYNC_NAME_PREFIX}-${name}" - fi + basename "${dir}" fi - - echo "${name}" } # --- Repository Management --- diff --git a/.github/actions/arcane-deploy/action.yml b/.github/actions/arcane-deploy/action.yml index ddbd567..9f28358 100644 --- a/.github/actions/arcane-deploy/action.yml +++ b/.github/actions/arcane-deploy/action.yml @@ -72,11 +72,6 @@ inputs: required: false default: 'true' - sync-name-prefix: - description: 'Prefix for sync names in Arcane. Defaults to the GitHub repository name.' - required: false - default: '' - # Workflow environment variables env-vars: description: 'Environment variables (KEY=VALUE per line) to export to the GitHub Actions runner via $GITHUB_ENV. These are available to subsequent workflow steps, NOT inside deployed containers. Values are automatically masked in logs.' @@ -117,5 +112,4 @@ runs: INPUT_AUTO_SYNC: ${{ inputs.auto-sync }} INPUT_SYNC_INTERVAL: ${{ inputs.sync-interval }} INPUT_TRIGGER_SYNC: ${{ inputs.trigger-sync }} - INPUT_SYNC_NAME_PREFIX: ${{ inputs.sync-name-prefix }} INPUT_ENV_VARS: ${{ inputs.env-vars }}