Enhance PocketBase workflow; fix installer scripts

Workflow: add push trigger for main branch on json/*.json and update the "Get JSON file for script" step to handle both workflow_dispatch and push events. The step now collects changed json/*.json files, validates each has a .slug with jq, ignores metadata/update-apps.json/versions.json, writes changed_app_jsons.txt, and sets a count output for downstream steps.

Installer & ct scripts: normalize indentation/formatting, ensure aliases.json and plugin-settings.json are initialized as {} and repos.json as [] when missing, and add missing trailing newlines. These changes improve robustness and shellcheck friendliness and make the workflow respond to direct pushes of app JSON files.
This commit is contained in:
CanbiZ (MickLesk)
2026-03-20 13:21:50 +01:00
parent b833eb68eb
commit 7738065237
3 changed files with 52 additions and 15 deletions

View File

@@ -15,8 +15,8 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
git \
unzip
git \
unzip
msg_ok "Installed Dependencies"
msg_info "Installing Bun"
@@ -44,19 +44,19 @@ DEGOOG_PLUGIN_SETTINGS_FILE=/opt/degoog/data/plugin-settings.json
EOF
if [[ ! -f /opt/degoog/data/aliases.json ]]; then
cat <<EOF >/opt/degoog/data/aliases.json
cat <<EOF >/opt/degoog/data/aliases.json
{}
EOF
fi
if [[ ! -f /opt/degoog/data/plugin-settings.json ]]; then
cat <<EOF >/opt/degoog/data/plugin-settings.json
cat <<EOF >/opt/degoog/data/plugin-settings.json
{}
EOF
fi
if [[ ! -f /opt/degoog/data/repos.json ]]; then
cat <<EOF >/opt/degoog/data/repos.json
cat <<EOF >/opt/degoog/data/repos.json
[]
EOF
fi
@@ -85,4 +85,4 @@ msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc
cleanup_lxc