From c772f83e142422fa892a8cc6d9542157291897ba Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:58:48 +0100 Subject: [PATCH 001/121] Update CHANGELOG.md (#1409) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0ebc224..2d04f9b5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Fix user in ghost-cli install command [@fabrice1236](https://github.com/fabrice1236) ([#1408](https://github.com/community-scripts/ProxmoxVE/pull/1408)) - Update Prometheus + Alertmanager: Unify scripts for easier maintenance [@andygrunwald](https://github.com/andygrunwald) ([#1402](https://github.com/community-scripts/ProxmoxVE/pull/1402)) - Update komodo.sh: Fix broken paths in update_script(). [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1403](https://github.com/community-scripts/ProxmoxVE/pull/1403)) - Fix: ActualBudget Update-Function [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1376](https://github.com/community-scripts/ProxmoxVE/pull/1376)) From 26d73317e82c0129d17d02a2feecccf464a967f4 Mon Sep 17 00:00:00 2001 From: Kyle Kroboth Date: Sat, 11 Jan 2025 01:36:23 -0500 Subject: [PATCH 002/121] LubeLogger CT vehicle tag typo fix (#1413) --- ct/lubelogger.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/lubelogger.sh b/ct/lubelogger.sh index 0f10b6670..d6f5f29ca 100644 --- a/ct/lubelogger.sh +++ b/ct/lubelogger.sh @@ -7,7 +7,7 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m # App Default Values APP="LubeLogger" -var_tags="verhicle;car" +var_tags="vehicle;car" var_cpu="1" var_ram="512" var_disk="2" From 6decf14d2e534039fdaffe60d65c2749d0800dbe Mon Sep 17 00:00:00 2001 From: Andy Grunwald Date: Sat, 11 Jan 2025 09:33:21 +0100 Subject: [PATCH 003/121] Prometheus: Fix installation via creating the service file (#1416) --- install/prometheus-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 959b1602a..294e9363a 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -32,7 +32,7 @@ echo "${RELEASE}" >/opt/${APPLICATION}_version.txt msg_ok "Installed Prometheus" msg_info "Creating Service" -cat </etc/systemd/system/prometheus.service" +cat </etc/systemd/system/prometheus.service echo "[Unit] Description=Prometheus Wants=network-online.target From 2347a669f29a1bdf94b377f79129668ceba0f891 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 09:35:02 +0100 Subject: [PATCH 004/121] Update CHANGELOG.md (#1415) --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d04f9b5b..ec4c34246 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,15 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-11 + +### Changed + +### 🚀 Updated Scripts + +- Prometheus: Fix installation via creating the service file [@andygrunwald](https://github.com/andygrunwald) ([#1416](https://github.com/community-scripts/ProxmoxVE/pull/1416)) +- Fix: LubeLogger CT vehicle tag typo [@kkroboth](https://github.com/kkroboth) ([#1413](https://github.com/community-scripts/ProxmoxVE/pull/1413)) + ## 2025-01-10 ### Changed From 0d8dcd5643a5fe0ddea6a989dd665cdefc57a844 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Sat, 11 Jan 2025 09:55:06 +0100 Subject: [PATCH 005/121] Update prometheus-alertmanager-install.sh: Service Creation Fix (#1418) --- install/prometheus-alertmanager-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/prometheus-alertmanager-install.sh b/install/prometheus-alertmanager-install.sh index 3ce9dc0a0..ad854ccdc 100755 --- a/install/prometheus-alertmanager-install.sh +++ b/install/prometheus-alertmanager-install.sh @@ -33,7 +33,7 @@ msg_ok "Installed Prometheus Alertmanager" msg_info "Creating Service" cat </etc/systemd/system/prometheus-alertmanager.service -echo "[Unit] +[Unit] Description=Prometheus Alertmanager Wants=network-online.target After=network-online.target @@ -49,7 +49,7 @@ ExecStart=/usr/local/bin/alertmanager \ ExecReload=/bin/kill -HUP \$MAINPID [Install] -WantedBy=multi-user.target" +WantedBy=multi-user.target EOF systemctl enable -q --now prometheus-alertmanager msg_ok "Created Service" From 1476d1b6c437bd88082d89ebdf7797b199f76df0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Sat, 11 Jan 2025 09:55:36 +0100 Subject: [PATCH 006/121] Update prometheus-install.sh: Service creation fix (#1417) --- install/prometheus-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/prometheus-install.sh b/install/prometheus-install.sh index 294e9363a..cbabb93ae 100644 --- a/install/prometheus-install.sh +++ b/install/prometheus-install.sh @@ -33,7 +33,7 @@ msg_ok "Installed Prometheus" msg_info "Creating Service" cat </etc/systemd/system/prometheus.service -echo "[Unit] +[Unit] Description=Prometheus Wants=network-online.target After=network-online.target @@ -49,7 +49,7 @@ ExecStart=/usr/local/bin/prometheus \ ExecReload=/bin/kill -HUP \$MAINPID [Install] -WantedBy=multi-user.target" +WantedBy=multi-user.target EOF systemctl enable -q --now prometheus msg_ok "Created Service" From 92020fed07a3dc71bc68c301b5b190143316c9bc Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 10:06:26 +0100 Subject: [PATCH 007/121] Update CHANGELOG.md (#1419) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec4c34246..49a8b9d99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Update prometheus-install.sh: Service creation fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1417](https://github.com/community-scripts/ProxmoxVE/pull/1417)) +- Update prometheus-alertmanager-install.sh: Service Creation Fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1418](https://github.com/community-scripts/ProxmoxVE/pull/1418)) - Prometheus: Fix installation via creating the service file [@andygrunwald](https://github.com/andygrunwald) ([#1416](https://github.com/community-scripts/ProxmoxVE/pull/1416)) - Fix: LubeLogger CT vehicle tag typo [@kkroboth](https://github.com/kkroboth) ([#1413](https://github.com/community-scripts/ProxmoxVE/pull/1413)) From cc40b5957d6fc96441875b9c61b4d116a4825b49 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:50:39 +0100 Subject: [PATCH 008/121] Update CHANGELOG.md (#1420) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a8b9d99..47e0c9331 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,9 +22,9 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts +- Prometheus: Fix installation via creating the service file [@andygrunwald](https://github.com/andygrunwald) ([#1416](https://github.com/community-scripts/ProxmoxVE/pull/1416)) - Update prometheus-install.sh: Service creation fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1417](https://github.com/community-scripts/ProxmoxVE/pull/1417)) - Update prometheus-alertmanager-install.sh: Service Creation Fix [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1418](https://github.com/community-scripts/ProxmoxVE/pull/1418)) -- Prometheus: Fix installation via creating the service file [@andygrunwald](https://github.com/andygrunwald) ([#1416](https://github.com/community-scripts/ProxmoxVE/pull/1416)) - Fix: LubeLogger CT vehicle tag typo [@kkroboth](https://github.com/kkroboth) ([#1413](https://github.com/community-scripts/ProxmoxVE/pull/1413)) ## 2025-01-10 From 695802152856a8bd011ad060a70082dd1cf91ead Mon Sep 17 00:00:00 2001 From: Diego Saint Esteben Date: Mon, 13 Jan 2025 07:02:35 -0300 Subject: [PATCH 009/121] Fix inexistent folder on actualbudget update script (#1444) --- ct/actualbudget.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ct/actualbudget.sh b/ct/actualbudget.sh index 8741053c9..4c779ad32 100644 --- a/ct/actualbudget.sh +++ b/ct/actualbudget.sh @@ -45,6 +45,7 @@ function update_script() { cd "${TEMPD}" wget -q https://codeload.github.com/actualbudget/actual-server/legacy.tar.gz/refs/tags/${RELEASE} -O - | tar -xz mv /opt/actualbudget /opt/actualbudget_bak + mkdir -p /opt/actualbudget/ mv actualbudget-actual-server-*/* /opt/actualbudget/ mv /opt/actualbudget_bak/.env /opt/actualbudget mv /opt/actualbudget_bak/server-files /opt/actualbudget/server-files From 737625024e8b5ba44de439d1f45138d23ad8ea57 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 13 Jan 2025 12:57:25 +0100 Subject: [PATCH 010/121] Update kavita.json (#1447) --- json/kavita.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/json/kavita.json b/json/kavita.json index 3ab3e87e5..dddd26a93 100644 --- a/json/kavita.json +++ b/json/kavita.json @@ -30,5 +30,9 @@ "username": null, "password": null }, - "notes": [] -} \ No newline at end of file + "notes": [{ + "text": "To enable folder adding append your lxc.conf on your host with 'lxc.environment: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1'", + "type": "info" + } + ] +} From ac64a9de31b8d74c7df79cf051c9e00cbc080d3d Mon Sep 17 00:00:00 2001 From: Andy Grunwald Date: Mon, 13 Jan 2025 13:02:42 +0100 Subject: [PATCH 011/121] GitHub Actions: Fix Shellsheck workflow to only run on changes `*.sh` files (#1423) --- .github/workflows/shellcheck.yml | 44 +++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 394229e6f..df096277c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -18,15 +18,45 @@ jobs: - uses: actions/checkout@v4 - name: Get changed files - id: changes + id: changed-files + uses: tj-actions/changed-files@v45 + with: + files: | + **.sh + + # This is a manual copy from https://github.com/ludeeus/action-shellcheck/blob/00b27aa7cb85167568cb48a3838b75f4265f2bca/action.yaml#L59 + # Why? Because the action is not capable of adding ONLY a list of files. + # We aim to only check the files that have changed. + # This is used as we deal with a codebase that throws a lot of warnings. + # Checking only the changed files is a good compromise to improve the codebase over time. + - name: Download shellcheck + shell: bash + env: + INPUT_VERSION: "v0.10.0" run: | - if ${{ github.event_name == 'pull_request' }}; then - echo "files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT + if [[ "${{ runner.os }}" == "macOS" ]]; then + osvariant="darwin" else - echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT + osvariant="linux" fi - - name: Run ShellCheck - if: steps.changes.outputs.files != '' + baseurl="https://github.com/koalaman/shellcheck/releases/download" + + curl -Lso "${{ github.action_path }}/sc.tar.xz" \ + "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" + + tar -xf "${{ github.action_path }}/sc.tar.xz" -C "${{ github.action_path }}" + mv "${{ github.action_path }}/shellcheck-${INPUT_VERSION}/shellcheck" \ + "${{ github.action_path }}/shellcheck" + + - name: Display shellcheck version + shell: bash run: | - echo "${{ steps.changes.outputs.files }}" | xargs shellcheck + "${{ github.action_path }}/shellcheck" --version + + - name: Run ShellCheck + if: steps.changed-files-specific.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + echo "${ALL_CHANGED_FILES}" | xargs shellcheck From e47d7c4452167e931ff143deff1922a3aa91a393 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:51:46 +0100 Subject: [PATCH 012/121] Update tandoor.sh: Call version.py to write current version (#1454) --- ct/tandoor.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ct/tandoor.sh b/ct/tandoor.sh index 146c73ee4..9a3dfe896 100644 --- a/ct/tandoor.sh +++ b/ct/tandoor.sh @@ -45,6 +45,8 @@ function update_script() { cd /opt/tandoor/vue yarn install >/dev/null 2>&1 yarn build >/dev/null 2>&1 + cd /opt/tandoor + python3 version.py &>/dev/null systemctl restart gunicorn_tandoor msg_ok "Updated ${APP}" fi @@ -58,4 +60,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}" From f8ab39e4d6e1ee761eec3d82b184fb21ebda6c93 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:56:37 +0100 Subject: [PATCH 013/121] Update CHANGELOG.md (#1446) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47e0c9331..63c53bb07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,23 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-13 + +### Changed + +### 🚀 Updated Scripts + +- Fix: tandoor.sh: Call version.py to write current version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1454](https://github.com/community-scripts/ProxmoxVE/pull/1454)) +- Fix inexistent folder on actualbudget update script [@dosten](https://github.com/dosten) ([#1444](https://github.com/community-scripts/ProxmoxVE/pull/1444)) + +### 🌐 Website + +- Update kavita.json: Add info on how to enable folder adding. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1447](https://github.com/community-scripts/ProxmoxVE/pull/1447)) + +### 🧰 Maintenance + +- GitHub Actions: Fix Shellsheck workflow to only run on changes `*.sh` files [@andygrunwald](https://github.com/andygrunwald) ([#1423](https://github.com/community-scripts/ProxmoxVE/pull/1423)) + ## 2025-01-11 ### Changed From 8caf5e59b3a23ec86bd5f42842218bc236017047 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:04:59 +0100 Subject: [PATCH 014/121] feat: allow adding SSH authorized key for root (advanced settings) by @dsiebel (#1456) * feat: allow adding SSH authorized key for root (advanced settings) by @dsiebel * remove spaces --- misc/build.func | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/misc/build.func b/misc/build.func index 26937e767..101d919bd 100644 --- a/misc/build.func +++ b/misc/build.func @@ -36,7 +36,7 @@ color() { INFO="${TAB}💡${TAB}${CL}" OS="${TAB}🖥️${TAB}${CL}" OSVERSION="${TAB}🌟${TAB}${CL}" - CONTAINERTYPE="${TAB}📦${TAB}${CL}" + CONTAINERTYPE="${TAB}📦${TAB}${CL}" DISKSIZE="${TAB}💾${TAB}${CL}" CPUCORE="${TAB}🧠${TAB}${CL}" RAMSIZE="${TAB}🛠️${TAB}${CL}" @@ -283,8 +283,9 @@ base_settings() { MAC="" VLAN="" SSH="no" + SSH_AUTHORIZED_KEY="" TAGS="community-script;" - + # Override default settings with variables from ct script CT_TYPE=${var_unprivileged:-$CT_TYPE} DISK_SIZE=${var_disk:-$DISK_SIZE} @@ -292,7 +293,7 @@ base_settings() { RAM_SIZE=${var_ram:-$RAM_SIZE} VERB=${var_verbose:-$VERBOSE} TAGS="${TAGS}${var_tags:-}" - + # Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts if [ -z "$var_os" ]; then var_os="debian" @@ -314,9 +315,9 @@ echo_default() { echo -e "${OS}${BOLD}${DGN}Operating System: ${BGN}$var_os${CL}" echo -e "${OSVERSION}${BOLD}${DGN}Version: ${BGN}$var_version${CL}" echo -e "${CONTAINERTYPE}${BOLD}${DGN}Container Type: ${BGN}$CT_TYPE_DESC${CL}" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" echo -e "${CPUCORE}${BOLD}${DGN}CPU Cores: ${BGN}${CORE_COUNT}${CL}" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" echo -e "${CONTAINERID}${BOLD}${DGN}Container ID: ${BGN}${CT_ID}${CL}" if [ "$VERB" == "yes" ]; then echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}Enabled${CL}" @@ -463,13 +464,13 @@ advanced_settings() { if DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Disk Size in GB" 8 58 $var_disk --title "DISK SIZE" 3>&1 1>&2 2>&3); then if [ -z "$DISK_SIZE" ]; then DISK_SIZE="$var_disk" - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" else if ! [[ $DISK_SIZE =~ $INTEGER ]]; then echo -e "{INFO}${HOLD}${RD} DISK SIZE MUST BE AN INTEGER NUMBER!${CL}" advanced_settings fi - echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE}GB${CL}" + echo -e "${DISKSIZE}${BOLD}${DGN}Disk Size: ${BGN}${DISK_SIZE} GB${CL}" fi else exit_script @@ -489,9 +490,9 @@ advanced_settings() { if RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Allocate RAM in MiB" 8 58 $var_ram --title "RAM" 3>&1 1>&2 2>&3); then if [ -z "$RAM_SIZE" ]; then RAM_SIZE="$var_ram" - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" else - echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE}MiB${CL}" + echo -e "${RAMSIZE}${BOLD}${DGN}RAM Size: ${BGN}${RAM_SIZE} MiB${CL}" fi else exit_script @@ -649,6 +650,15 @@ advanced_settings() { echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}" fi + if [[ "${SSH}" == "yes" ]]; then + SSH_AUTHORIZED_KEY="$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "SSH Authorized key for root (leave empty for none)" 8 58 --title "SSH Key" 3>&1 1>&2 2>&3)" + + if [[ -z "${SSH_AUTHORIZED_KEY}" ]]; then + echo "Warning: No SSH key provided." + fi + else + SSH_AUTHORIZED_KEY="" + fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then VERB="yes" else @@ -697,15 +707,15 @@ install_script() { header_info echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME${CL}" VERB="no" - base_settings "$VERB" + base_settings "$VERB" echo_default break ;; 2) header_info - echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}${BL}Verbose)${CL}" + echo -e "${DEFAULT}${BOLD}${BL}Using Default Settings on node $PVEHOST_NAME (${SEARCH}Verbose)${CL}" VERB="yes" - base_settings "$VERB" + base_settings "$VERB" echo_default break ;; @@ -729,13 +739,13 @@ install_script() { check_container_resources() { # Check actual RAM & Cores current_ram=$(free -m | awk 'NR==2{print $2}') - current_cpu=$(nproc) + current_cpu=$(nproc) # Check whether the current RAM is less than the required RAM or the CPU cores are less than required if [[ "$current_ram" -lt "$var_ram" ]] || [[ "$current_cpu" -lt "$var_cpu" ]]; then echo -e "\n${INFO}${HOLD} ${GN}Required: ${var_cpu} CPU, ${var_ram}MB RAM ${CL}| ${RD}Current: ${current_cpu} CPU, ${current_ram}MB RAM${CL}" echo -e "${YWB}Please ensure that the ${APP} LXC is configured with at least ${var_cpu} vCPU and ${var_ram} MB RAM for the build process.${CL}\n" - read -r -p "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " prompt + read -r -p "${INFO}${HOLD} May cause data loss! ${INFO} Continue update with under-provisioned LXC? " prompt # Check if the input is 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(yes)$ ]]; then echo -e "${CROSS}${HOLD} ${YWB}Exiting based on user input.${CL}" @@ -754,7 +764,7 @@ check_container_storage() { if (( usage > 80 )); then # Prompt the user for confirmation to continue echo -e "${INFO}${HOLD} ${YWB}Warning: Storage is dangerously low (${usage}%).${CL}" - read -r -p "Continue anyway? " prompt + read -r -p "Continue anyway? " prompt # Check if the input is 'y' or 'yes', otherwise exit with status 1 if [[ ! ${prompt,,} =~ ^(y|yes)$ ]]; then echo -e "${CROSS}${HOLD}${YWB}Exiting based on user input.${CL}" From 07c9dc4d0a98e33ff96bb06b2813a8aa555e0886 Mon Sep 17 00:00:00 2001 From: MahrWe <28512631+MahrWe@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:58:14 +0100 Subject: [PATCH 015/121] Update Hoarder: Improvement .env location (see PR comment for little migration) (#1325) * Update .env file location in hoarder-install.sh * Update .env file location in hoarder.sh No more need to move around the .env file * migration of .env to hoarder.env in hoarder.sh * Update ct/hoarder.sh Co-authored-by: Mohamed Bassem --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Mohamed Bassem --- ct/hoarder.sh | 10 ++++++---- install/hoarder-install.sh | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ct/hoarder.sh b/ct/hoarder.sh index b91765ec7..5a905ad2b 100644 --- a/ct/hoarder.sh +++ b/ct/hoarder.sh @@ -40,7 +40,10 @@ function update_script() { msg_ok "Stopped Services" msg_info "Updating ${APP} to v${RELEASE}" cd /opt - mv /opt/hoarder/.env /opt/.env + if [[ -f /opt/hoarder/.env ]] && [[ ! -f /etc/hoarder/hoarder.env ]]; then + mkdir -p /etc/hoarder + mv /opt/hoarder/.env /etc/hoarder/hoarder.env + fi rm -rf /opt/hoarder wget -q "https://github.com/hoarder-app/hoarder/archive/refs/tags/v${RELEASE}.zip" unzip -q v${RELEASE}.zip @@ -54,8 +57,7 @@ function update_script() { export DATA_DIR=/opt/hoarder_data cd /opt/hoarder/packages/db pnpm migrate &>/dev/null - mv /opt/.env /opt/hoarder/.env - sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /opt/hoarder/.env + sed -i "s/SERVER_VERSION=${PREV_RELEASE}/SERVER_VERSION=${RELEASE}/" /etc/hoarder/hoarder.env msg_ok "Updated ${APP} to v${RELEASE}" msg_info "Starting Services" @@ -79,4 +81,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}" diff --git a/install/hoarder-install.sh b/install/hoarder-install.sh index 4b56b0761..a513460cf 100644 --- a/install/hoarder-install.sh +++ b/install/hoarder-install.sh @@ -78,7 +78,8 @@ $STD pnpm install --frozen-lockfile export DATA_DIR=/opt/hoarder_data HOARDER_SECRET=$(openssl rand -base64 36 | cut -c1-24) -cat </opt/hoarder/.env +mkdir -p /etc/hoarder +cat </etc/hoarder/hoarder.env SERVER_VERSION=$RELEASE NEXTAUTH_SECRET="$HOARDER_SECRET" NEXTAUTH_URL="http://localhost:3000" @@ -129,7 +130,7 @@ After=network.target hoarder-workers.service [Service] ExecStart=pnpm start WorkingDirectory=/opt/hoarder/apps/web -EnvironmentFile=/opt/hoarder/.env +EnvironmentFile=/etc/hoarder/hoarder.env Restart=always [Install] @@ -159,7 +160,7 @@ After=network.target hoarder-browser.service meilisearch.service [Service] ExecStart=pnpm start:prod WorkingDirectory=/opt/hoarder/apps/workers -EnvironmentFile=/opt/hoarder/.env +EnvironmentFile=/etc/hoarder/hoarder.env Restart=always TimeoutStopSec=5 From 2f620240a86ce3b190f9b488c057fa6b6f709ac8 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 16:58:45 +0100 Subject: [PATCH 016/121] Update CHANGELOG.md (#1457) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63c53bb07..4e5727286 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ Do not break established syntax in this file, as it is automatically updated by ### Changed +### 💥 Breaking Changes + +- Update Hoarder: Improvement .env location (see PR comment for little migration) [@MahrWe](https://github.com/MahrWe) ([#1325](https://github.com/community-scripts/ProxmoxVE/pull/1325)) + ### 🚀 Updated Scripts - Fix: tandoor.sh: Call version.py to write current version [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1454](https://github.com/community-scripts/ProxmoxVE/pull/1454)) @@ -33,6 +37,10 @@ Do not break established syntax in this file, as it is automatically updated by - GitHub Actions: Fix Shellsheck workflow to only run on changes `*.sh` files [@andygrunwald](https://github.com/andygrunwald) ([#1423](https://github.com/community-scripts/ProxmoxVE/pull/1423)) +### ❔ Unlabelled + +- feat: allow adding SSH authorized key for root (advanced settings) by @dsiebel [@MickLesk](https://github.com/MickLesk) ([#1456](https://github.com/community-scripts/ProxmoxVE/pull/1456)) + ## 2025-01-11 ### Changed From e60dc6784d26dfc4c31259f0988403a4ed68b3f0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:34:03 +0100 Subject: [PATCH 017/121] Update lazylibrarian-install.sh: Add pypdf libary (#1467) --- install/lazylibrarian-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/lazylibrarian-install.sh b/install/lazylibrarian-install.sh index dd00bab99..014a0400c 100644 --- a/install/lazylibrarian-install.sh +++ b/install/lazylibrarian-install.sh @@ -33,6 +33,7 @@ $STD apt-get install -y \ $STD pip install jaraco.stream $STD pip install python-Levenshtein $STD pip install soupsieve +$STD pip install pypdf msg_ok "Installed Python3 Dependencies" msg_info "Installing LazyLibrarian" From 64297e7191375da060d444554e2261ecf655697f Mon Sep 17 00:00:00 2001 From: jd Date: Tue, 14 Jan 2025 07:54:45 -0300 Subject: [PATCH 018/121] New Script: Opengist (#1429) * feat(script): added opengist lxc * fix: executable was inside the folder * chore: use script from the fork * chore: proper copyright * chore: self script * chore: self script * chore: use original sources * chore: back to links from fork * fix: added /ref/head to urls * fix: wrong executble path * fix: git required to execute * chore: proper links, prep PR * Update install.func * Update install.func * Update build.func * Update build.func * fix(review): mc, release, license, -q * Update opengist.sh * Update opengist-install.sh * Update opengist.sh * Update opengist.sh * Update opengist.sh * fix(review): output for tar command --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> --- ct/opengist.sh | 71 +++++++++++++++++++++++++++++++++++++ install/opengist-install.sh | 60 +++++++++++++++++++++++++++++++ json/opengist.json | 34 ++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 ct/opengist.sh create mode 100644 install/opengist-install.sh create mode 100644 json/opengist.json diff --git a/ct/opengist.sh b/ct/opengist.sh new file mode 100644 index 000000000..65b586b43 --- /dev/null +++ b/ct/opengist.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jonathan (jd-apprentice) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://opengist.io/ + +# App Default Values +APP="Opengist" +var_tags="development" +var_cpu="1" +var_ram="1024" +var_disk="8" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/opengist ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Stopping Service" + systemctl stop opengist.service + msg_ok "Stopped Service" + apt-get update &>/dev/null + apt-get upgrade &>/dev/null + RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + wget -qO "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" + rm -rf /opt/opengist + tar -xzf opengist${RELEASE}-linux-amd64.tar.gz + chmod +x /opt/opengist/opengist + echo "${RELEASE}" >"/opt/${APP}_version.txt" + rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz + apt-get -y autoremove &>/dev/null + apt-get -y autoclean &>/dev/null + msg_ok "Updated ${APP} LXC" + + msg_info "Starting Service" + systemctl start opengist.service + msg_ok "Started Service" + + else + msg_ok "No update required. ${APP} is already at v${RELEASE}." + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:6157${CL}" diff --git a/install/opengist-install.sh b/install/opengist-install.sh new file mode 100644 index 000000000..93c6c96da --- /dev/null +++ b/install/opengist-install.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Jonathan (jd-apprentice) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + mc \ + curl \ + sudo +msg_ok "Installed Dependencies" + +msg_info "Install Opengist" +RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" +wget -q "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" +$STD tar -xzf opengist${RELEASE}-linux-amd64.tar.gz +mv opengist /opt/opengist +chmod +x /opt/opengist/opengist +mkdir -p /opt/opengist-data +msg_ok "Installed Opengist" + +msg_info "Creating Service" + +sed -i 's|opengist-home:.*|opengist-home: /opt/opengist-data|' /opt/opengist/config.yml + +cat </etc/systemd/system/opengist.service +[Unit] +Description=Opengist server to manage your Gists +After=network.target + +[Service] +WorkingDirectory=/opt/opengist +ExecStart=/opt/opengist/opengist --config config.yaml +Restart=always +User=root + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now opengist.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /opengist${RELEASE}-linux-amd64.tar.gz +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/opengist.json b/json/opengist.json new file mode 100644 index 000000000..cfb6d4ec2 --- /dev/null +++ b/json/opengist.json @@ -0,0 +1,34 @@ +{ + "name": "Opengist", + "slug": "opengist", + "categories": [ + 3 + ], + "date_created": "2025-11-01", + "type": "ct", + "updateable": false, + "privileged": false, + "interface_port": 6157, + "documentation": null, + "website": "https://opengist.io/", + "logo": "https://raw.githubusercontent.com/thomiceli/opengist/master/public/opengist.svg", + "description": "Self-hosted pastebin powered by Git, open-source alternative to Github Gist.", + "install_methods": [ + { + "type": "default", + "script": "ct/opengist.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 8, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From 364109877f10ad943129272df9d12aaf1ae3c25c Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:07:58 +0100 Subject: [PATCH 019/121] Update opengist-install.sh: Add git as dependencie (#1471) * Update opengist-install.sh: Add git as dependencie * Update opengist-install.sh --- install/opengist-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/opengist-install.sh b/install/opengist-install.sh index 93c6c96da..7893819f9 100644 --- a/install/opengist-install.sh +++ b/install/opengist-install.sh @@ -16,7 +16,8 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ mc \ curl \ - sudo + sudo \ + git msg_ok "Installed Dependencies" msg_info "Install Opengist" @@ -40,7 +41,7 @@ After=network.target [Service] WorkingDirectory=/opt/opengist -ExecStart=/opt/opengist/opengist --config config.yaml +ExecStart=/opt/opengist/opengist --config /opt/opengist/config.yml Restart=always User=root From 13671c613b4b9c12244dbb3b15f443d53cc3cce0 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:24:01 +0100 Subject: [PATCH 020/121] Update CHANGELOG.md (#1469) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5727286..37dc52ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,19 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-14 + +### Changed + +### ✨ New Scripts + +- New Script: Opengist [@jd-apprentice](https://github.com/jd-apprentice) ([#1429](https://github.com/community-scripts/ProxmoxVE/pull/1429)) + +### 🚀 Updated Scripts + +- Update opengist-install.sh: Add git as dependencie [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1471](https://github.com/community-scripts/ProxmoxVE/pull/1471)) +- Update lazylibrarian-install.sh: Add pypdf libary [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1467](https://github.com/community-scripts/ProxmoxVE/pull/1467)) + ## 2025-01-13 ### Changed From 86706e6233d4459bd561304ccb36796904606977 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:24:56 +0100 Subject: [PATCH 021/121] Update CHANGELOG.md (#1474) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37dc52ed6..558257269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,8 +26,8 @@ Do not break established syntax in this file, as it is automatically updated by ### 🚀 Updated Scripts -- Update opengist-install.sh: Add git as dependencie [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1471](https://github.com/community-scripts/ProxmoxVE/pull/1471)) - Update lazylibrarian-install.sh: Add pypdf libary [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1467](https://github.com/community-scripts/ProxmoxVE/pull/1467)) +- Update opengist-install.sh: Add git as dependencie [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1471](https://github.com/community-scripts/ProxmoxVE/pull/1471)) ## 2025-01-13 From 97ca73833221b8e13dd880a7c8941f2a6e23a39e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:29:08 +0100 Subject: [PATCH 022/121] [core] Update build.func: Fix bug with advanced tags (#1473) --- misc/build.func | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 101d919bd..0810e5011 100644 --- a/misc/build.func +++ b/misc/build.func @@ -629,9 +629,14 @@ advanced_settings() { if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=${ADV_TAGS:-""} - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') # Remove whitespace from ADV_TAGS + if [[ "$ADV_TAGS" != *"community-script"* ]]; then TAGS="community-script;${ADV_TAGS}" + else + TAGS="${ADV_TAGS}" # ADV_TAGS already contains "community-script" + fi + else + TAGS="" fi echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" else From 4c13164ad37ee62be8bb6bee1605cfa5f9f9b58b Mon Sep 17 00:00:00 2001 From: rajat <32998741+rajatdiptabiswas@users.noreply.github.com> Date: Tue, 14 Jan 2025 05:31:05 -0800 Subject: [PATCH 023/121] Update footer text on website (#1466) Changed "Website build by the community" to "Website built by the community". --- frontend/src/components/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 83aa05cec..38a93803c 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -6,7 +6,7 @@ export default function Footer() {
- Website build by the community. The source code is avaliable on{" "} + Website built by the community. The source code is avaliable on{" "} Date: Tue, 14 Jan 2025 14:33:32 +0100 Subject: [PATCH 024/121] Update shellcheck.yml --- .github/workflows/shellcheck.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index df096277c..31a351ac8 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -34,17 +34,18 @@ jobs: env: INPUT_VERSION: "v0.10.0" run: | + set -euo pipefail if [[ "${{ runner.os }}" == "macOS" ]]; then osvariant="darwin" else osvariant="linux" fi - + baseurl="https://github.com/koalaman/shellcheck/releases/download" - curl -Lso "${{ github.action_path }}/sc.tar.xz" \ "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" - + + mkdir -p "${{ github.action_path }}/shellcheck-${INPUT_VERSION}" tar -xf "${{ github.action_path }}/sc.tar.xz" -C "${{ github.action_path }}" mv "${{ github.action_path }}/shellcheck-${INPUT_VERSION}/shellcheck" \ "${{ github.action_path }}/shellcheck" From 53b96a98c09023d109e2344cb88d64e3b42ce971 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:35:51 +0100 Subject: [PATCH 025/121] Update shellcheck.yml --- .github/workflows/shellcheck.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 31a351ac8..cc47666dc 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -42,13 +42,20 @@ jobs: fi baseurl="https://github.com/koalaman/shellcheck/releases/download" - curl -Lso "${{ github.action_path }}/sc.tar.xz" \ + + # ShellCheck herunterladen ins Arbeitsverzeichnis + curl -Lso "${{ github.workspace }}/sc.tar.xz" \ "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" - mkdir -p "${{ github.action_path }}/shellcheck-${INPUT_VERSION}" - tar -xf "${{ github.action_path }}/sc.tar.xz" -C "${{ github.action_path }}" - mv "${{ github.action_path }}/shellcheck-${INPUT_VERSION}/shellcheck" \ - "${{ github.action_path }}/shellcheck" + # Entpacken und verschieben + tar -xf "${{ github.workspace }}/sc.tar.xz" -C "${{ github.workspace }}" + mv "${{ github.workspace }}/shellcheck-${INPUT_VERSION}/shellcheck" \ + "${{ github.workspace }}/shellcheck" + + # Debugging: Zeige den Pfad und die Datei + echo "ShellCheck binary path:" + ls -l "${{ github.workspace }}/shellcheck" + - name: Display shellcheck version shell: bash From 76fa4c68d10b91cc3a8ffe17406714d876a9ccbb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:37:26 +0100 Subject: [PATCH 026/121] Update shellcheck.yml --- .github/workflows/shellcheck.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index cc47666dc..4385fc8e9 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -24,12 +24,7 @@ jobs: files: | **.sh - # This is a manual copy from https://github.com/ludeeus/action-shellcheck/blob/00b27aa7cb85167568cb48a3838b75f4265f2bca/action.yaml#L59 - # Why? Because the action is not capable of adding ONLY a list of files. - # We aim to only check the files that have changed. - # This is used as we deal with a codebase that throws a lot of warnings. - # Checking only the changed files is a good compromise to improve the codebase over time. - - name: Download shellcheck + - name: Download ShellCheck shell: bash env: INPUT_VERSION: "v0.10.0" @@ -40,31 +35,26 @@ jobs: else osvariant="linux" fi - + baseurl="https://github.com/koalaman/shellcheck/releases/download" - - # ShellCheck herunterladen ins Arbeitsverzeichnis curl -Lso "${{ github.workspace }}/sc.tar.xz" \ "${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz" - - # Entpacken und verschieben + tar -xf "${{ github.workspace }}/sc.tar.xz" -C "${{ github.workspace }}" mv "${{ github.workspace }}/shellcheck-${INPUT_VERSION}/shellcheck" \ "${{ github.workspace }}/shellcheck" - - # Debugging: Zeige den Pfad und die Datei - echo "ShellCheck binary path:" + + - name: Verify ShellCheck binary + run: | ls -l "${{ github.workspace }}/shellcheck" - - - name: Display shellcheck version - shell: bash + - name: Display ShellCheck version run: | - "${{ github.action_path }}/shellcheck" --version + "${{ github.workspace }}/shellcheck" --version - name: Run ShellCheck - if: steps.changed-files-specific.outputs.any_changed == 'true' + if: steps.changed-files.outputs.any_changed == 'true' env: ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} run: | - echo "${ALL_CHANGED_FILES}" | xargs shellcheck + echo "${ALL_CHANGED_FILES}" | xargs "${{ github.workspace }}/shellcheck" From ed1a618f6d9bb037559e1f3b49fe1e34b8ed9517 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:40:41 +0100 Subject: [PATCH 027/121] Delete .github/workflows/merge-main.yml --- .github/workflows/merge-main.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/merge-main.yml diff --git a/.github/workflows/merge-main.yml b/.github/workflows/merge-main.yml deleted file mode 100644 index fa8a984ba..000000000 --- a/.github/workflows/merge-main.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Merge main into update-app-headers - -on: - push: - branches: - - main - paths: - - 'ct/**.sh' - -jobs: - merge-main: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Git - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - - - name: Merge main into update-app-headers silently - run: | - git fetch origin - git checkout update-app-headers - git merge origin/main --allow-unrelated-histories --no-commit -m "Merge main into update-app-headers" - git push origin update-app-headers > /dev/null 2>&1 || true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3830527ef29f5f5010fb3afa04fcd2192b20ee56 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:40:57 +0100 Subject: [PATCH 028/121] Delete .github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers --- ..._update .app-headers_in_update-app-headers | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers diff --git a/.github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers b/.github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers deleted file mode 100644 index e93b2abc3..000000000 --- a/.github/workflows/App_Header_Merge_update .app-headers_in_update-app-headers +++ /dev/null @@ -1,34 +0,0 @@ -name: Update .app-headers with figlet output - -on: - workflow_run: - workflows: ["Merge main into update-app-headers"] - types: - - completed - -jobs: - update-app-headers: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Ensure .app-headers file exists silently - run: | - if [ ! -f ct/.app-headers ]; then - touch ct/.app-headers - fi - - - name: Update .app-headers with figlet output silently - run: | - for script in ct/*.sh; do - if grep -q 'APP=' "$script"; then - APP_NAME=$(grep -oP 'APP=\K\w+' "$script") - if [ ! -z "$APP_NAME" ]; then - echo "Adding $APP_NAME to .app-headers" - figlet "$APP_NAME" >> ct/.app-headers 2>/dev/null || echo "figlet failed for $APP_NAME" - fi - fi - done - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 692f3caab6cde9066244e390d8d9a3ee72e92b9d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:43:07 +0100 Subject: [PATCH 029/121] Update and rename App_Header_Merge_Into_main.yaml to auto-update-app-headers.yml --- .../workflows/App_Header_Merge_Into_main.yaml | 66 ------------------- .github/workflows/auto-update-app-headers.yml | 63 ++++++++++++++++++ 2 files changed, 63 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/App_Header_Merge_Into_main.yaml create mode 100644 .github/workflows/auto-update-app-headers.yml diff --git a/.github/workflows/App_Header_Merge_Into_main.yaml b/.github/workflows/App_Header_Merge_Into_main.yaml deleted file mode 100644 index 0c9f53320..000000000 --- a/.github/workflows/App_Header_Merge_Into_main.yaml +++ /dev/null @@ -1,66 +0,0 @@ -name: Auto Update .app-headers and Create PR - -on: - push: - branches: - - main - paths: - - 'ct/**.sh' - -jobs: - update-app-headers: - runs-on: ubuntu-latest - steps: - # Step 1: Checkout the repository - - name: Checkout repository - uses: actions/checkout@v2 - - # Step 2: Set up Git user for committing changes - - name: Set up Git - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - - # Step 3: Ensure .app-headers file exists - - name: Ensure .app-headers file exists - run: | - if [ ! -f ct/.app-headers ]; then - echo "Creating .app-headers file." - touch ct/.app-headers - fi - - # Step 4: Process the ct/*.sh files and update .app-headers - - name: Update .app-headers with figlet output - run: | - echo "Updating .app-headers with figlet output." - for script in ct/*.sh; do - if grep -q 'APP=' "$script"; then - APP_NAME=$(grep -oP 'APP=\K\w+' "$script") - echo "Processing $script for APP: \"$APP_NAME\"" - figlet "$APP_NAME" >> ct/.app-headers - fi - done - - # Step 5: Check out and merge main into the update-app-headers branch without committing - - name: Merge main into update-app-headers - run: | - git fetch origin - git checkout update-app-headers - git merge origin/main --no-ff --no-commit -m "Merge main into update-app-headers" - echo "Merge complete. Please review and commit the changes manually." - - # Step 6: Check if a PR exists and create one if it doesn't - - name: Create Pull Request if not exists - run: | - PR_EXISTS=$(gh pr list --head "update-app-headers" --json number --jq '.[].number') - - if [ -z "$PR_EXISTS" ]; then - echo "Creating a new PR." - PR_URL=$(gh pr create --title "[core]: update .app-headers to latest version" \ - --body "This PR automatically updates the .app-headers file." \ - --head update-app-headers \ - --base main) - echo "PR created: $PR_URL" - else - echo "PR already exists." - fi diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml new file mode 100644 index 000000000..2cb21c55c --- /dev/null +++ b/.github/workflows/auto-update-app-headers.yml @@ -0,0 +1,63 @@ +name: Auto Update .app-headers with Hard Merge from Main + +on: + push: + branches: + - main + paths: + - 'ct/**.sh' + +jobs: + auto-update: + runs-on: ubuntu-latest + steps: + # Step 1: Checkout repository + - name: Checkout repository + uses: actions/checkout@v2 + + # Step 2: Set up Git user + - name: Set up Git + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + + # Step 3: Reset update-app-headers to main + - name: Reset update-app-headers branch to main + run: | + git checkout -B update-app-headers origin/main + echo "Branch update-app-headers reset to match main" + + # Step 4: Ensure .app-headers file exists + - name: Ensure .app-headers file exists + run: | + touch ct/.app-headers + + # Step 5: Update .app-headers with figlet output + - name: Update .app-headers + run: | + output_file="./ct/.app-headers" + > "$output_file" # Clear or create the file + + current_date=$(date +"%m-%d-%Y") + echo "### Generated on $current_date" >> "$output_file" + echo "##################################################" >> "$output_file" + echo >> "$output_file" + + find ./ct -type f -name "*.sh" | sort | while read -r script; do + app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null) + + if [[ -n "$app_name" ]]; then + figlet_output=$(figlet -f slant "$app_name" 2>/dev/null || echo "FIGLET ERROR: $app_name") + echo "### $(basename "$script")" >> "$output_file" + echo "APP=$app_name" >> "$output_file" + echo "$figlet_output" >> "$output_file" + echo >> "$output_file" + fi + done + + # Step 6: Commit and push changes + - name: Commit and push changes + run: | + git add ct/.app-headers + git commit -m "Update .app-headers on $(date +"%Y-%m-%d")" || echo "No changes to commit" + git push --force origin update-app-headers From 3c2db95345ba48bd4a345491d4c8f35a160fa617 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:44:00 +0100 Subject: [PATCH 030/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 2cb21c55c..aabe702ef 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -6,6 +6,7 @@ on: - main paths: - 'ct/**.sh' + workflow_dispatch: jobs: auto-update: From 8c54d25bf5ee59efe5bf8721b83a4b945e918894 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:45:04 +0100 Subject: [PATCH 031/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index aabe702ef..8da4e575b 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -6,7 +6,7 @@ on: - main paths: - 'ct/**.sh' - workflow_dispatch: + workflow_dispatch: jobs: auto-update: From 910e767bb4c69a9d734bc01b04c047d3f944968f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:48:47 +0100 Subject: [PATCH 032/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 67 +++++++++---------- 1 file changed, 30 insertions(+), 37 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 8da4e575b..28e510d24 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -6,59 +6,52 @@ on: - main paths: - 'ct/**.sh' - workflow_dispatch: + workflow_dispatch: # Ermöglicht das manuelle Ausführen der Action jobs: - auto-update: + update-app-headers: runs-on: ubuntu-latest + steps: - # Step 1: Checkout repository + # Step 1: Checkout the repository - name: Checkout repository uses: actions/checkout@v2 - # Step 2: Set up Git user + # Step 2: Set up Git user for committing changes - name: Set up Git run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - # Step 3: Reset update-app-headers to main - - name: Reset update-app-headers branch to main + # Step 3: Create a new branch from main + - name: Create a new branch based on main run: | - git checkout -B update-app-headers origin/main - echo "Branch update-app-headers reset to match main" + git fetch origin + git checkout main + git pull origin main + BRANCH_NAME="update-app-headers-$(date +'%Y-%m-%d-%H-%M-%S')" + git checkout -b "$BRANCH_NAME" + echo "Created and switched to branch $BRANCH_NAME" - # Step 4: Ensure .app-headers file exists - - name: Ensure .app-headers file exists + # Step 4: Run the generate-app-headers.sh script to update .app-headers + - name: Run generate-app-headers.sh to update .app-headers run: | - touch ct/.app-headers + chmod +x .github/workflows/generate-app-headers.sh + .github/workflows/generate-app-headers.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Step 5: Update .app-headers with figlet output - - name: Update .app-headers + # Step 5: Push changes to the new branch + - name: Push changes to the new branch run: | - output_file="./ct/.app-headers" - > "$output_file" # Clear or create the file + git add ./misc/.app-headers + git commit -m "Update .app-headers file" + git push origin "$BRANCH_NAME" - current_date=$(date +"%m-%d-%Y") - echo "### Generated on $current_date" >> "$output_file" - echo "##################################################" >> "$output_file" - echo >> "$output_file" - - find ./ct -type f -name "*.sh" | sort | while read -r script; do - app_name=$(grep -oP '^APP="\K[^"]+' "$script" 2>/dev/null) - - if [[ -n "$app_name" ]]; then - figlet_output=$(figlet -f slant "$app_name" 2>/dev/null || echo "FIGLET ERROR: $app_name") - echo "### $(basename "$script")" >> "$output_file" - echo "APP=$app_name" >> "$output_file" - echo "$figlet_output" >> "$output_file" - echo >> "$output_file" - fi - done - - # Step 6: Commit and push changes - - name: Commit and push changes + # Step 6: Delete the created branch locally and remotely after push + - name: Delete the branch after push run: | - git add ct/.app-headers - git commit -m "Update .app-headers on $(date +"%Y-%m-%d")" || echo "No changes to commit" - git push --force origin update-app-headers + git push origin --delete "$BRANCH_NAME" # Delete remote branch + git checkout main + git branch -D "$BRANCH_NAME" # Delete local branch + echo "Branch $BRANCH_NAME deleted." From 7ab5485fc3e278e61df4fba5879d18fdf0c4db77 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:51:19 +0100 Subject: [PATCH 033/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 28e510d24..5993efc3a 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -32,6 +32,9 @@ jobs: BRANCH_NAME="update-app-headers-$(date +'%Y-%m-%d-%H-%M-%S')" git checkout -b "$BRANCH_NAME" echo "Created and switched to branch $BRANCH_NAME" + + - name: Install figlet + run: sudo apt-get install -y figlet # Step 4: Run the generate-app-headers.sh script to update .app-headers - name: Run generate-app-headers.sh to update .app-headers From 78ed820bb00f928f98037f4cda40f7514d3db125 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:54:00 +0100 Subject: [PATCH 034/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 5993efc3a..01d1de36a 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -30,6 +30,7 @@ jobs: git checkout main git pull origin main BRANCH_NAME="update-app-headers-$(date +'%Y-%m-%d-%H-%M-%S')" + echo "Branch name: $BRANCH_NAME" # Debugging git checkout -b "$BRANCH_NAME" echo "Created and switched to branch $BRANCH_NAME" @@ -47,6 +48,7 @@ jobs: # Step 5: Push changes to the new branch - name: Push changes to the new branch run: | + echo "Pushing changes to branch $BRANCH_NAME" # Debugging git add ./misc/.app-headers git commit -m "Update .app-headers file" git push origin "$BRANCH_NAME" From 45916edef5b27d59f7cb709ef63cfe7d949364fd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:55:18 +0100 Subject: [PATCH 035/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 01d1de36a..784e732b0 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -29,8 +29,11 @@ jobs: git fetch origin git checkout main git pull origin main - BRANCH_NAME="update-app-headers-$(date +'%Y-%m-%d-%H-%M-%S')" + + # Feste Branch-Name für Debugging + BRANCH_NAME="update-app-headers-branch" echo "Branch name: $BRANCH_NAME" # Debugging + git checkout -b "$BRANCH_NAME" echo "Created and switched to branch $BRANCH_NAME" From 647fb1cb5e5fd5a169b5ed9e8b0f2ee0422c60fd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:58:23 +0100 Subject: [PATCH 036/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 784e732b0..9fd53ecf2 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -6,7 +6,7 @@ on: - main paths: - 'ct/**.sh' - workflow_dispatch: # Ermöglicht das manuelle Ausführen der Action + workflow_dispatch: jobs: update-app-headers: @@ -23,20 +23,7 @@ jobs: git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - # Step 3: Create a new branch from main - - name: Create a new branch based on main - run: | - git fetch origin - git checkout main - git pull origin main - - # Feste Branch-Name für Debugging - BRANCH_NAME="update-app-headers-branch" - echo "Branch name: $BRANCH_NAME" # Debugging - - git checkout -b "$BRANCH_NAME" - echo "Created and switched to branch $BRANCH_NAME" - + # Step 3: Install figlet - name: Install figlet run: sudo apt-get install -y figlet @@ -48,18 +35,20 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Step 5: Push changes to the new branch - - name: Push changes to the new branch + # Step 5: Commit the changes directly to main (no temporary branch) + - name: Commit changes directly to main run: | - echo "Pushing changes to branch $BRANCH_NAME" # Debugging git add ./misc/.app-headers git commit -m "Update .app-headers file" - git push origin "$BRANCH_NAME" + git push origin main - # Step 6: Delete the created branch locally and remotely after push - - name: Delete the branch after push - run: | - git push origin --delete "$BRANCH_NAME" # Delete remote branch - git checkout main - git branch -D "$BRANCH_NAME" # Delete local branch - echo "Branch $BRANCH_NAME deleted." + # Step 6: Create Pull Request (PR) to main + - name: Create Pull Request to main + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + base: main + head: main # Direkt gegen den main Branch + title: "Update .app-headers file" + body: "Automated PR to update .app-headers file based on script changes." + draft: false # Setze auf true, wenn der PR als Draft erstellt werden soll From 434c938cde4144c22599c1655ce96f0eddb1d4ac Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:01:05 +0100 Subject: [PATCH 037/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 9fd53ecf2..906f37349 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -1,4 +1,4 @@ -name: Auto Update .app-headers with Hard Merge from Main +name: Auto Update .app-headers on: push: @@ -6,14 +6,18 @@ on: - main paths: - 'ct/**.sh' - workflow_dispatch: + workflow_dispatch: # Ermöglicht das manuelle Ausführen der Action jobs: update-app-headers: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: - # Step 1: Checkout the repository + # Step 1: Checkout repository - name: Checkout repository uses: actions/checkout@v2 @@ -23,7 +27,7 @@ jobs: git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - # Step 3: Install figlet + # Step 3: Install figlet - name: Install figlet run: sudo apt-get install -y figlet @@ -35,20 +39,36 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Step 5: Commit the changes directly to main (no temporary branch) - - name: Commit changes directly to main + # Step 5: Check if there are any changes + - name: Check if there are any changes + id: verify-diff run: | + git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT + + # Step 6: Commit changes (if any) and create a PR + - name: Commit and create PR if changes exist + if: steps.verify-diff.outputs.changed == 'true' + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" git add ./misc/.app-headers git commit -m "Update .app-headers file" - git push origin main + # Create a temporary branch for the PR + git checkout -b pr-update-app-headers + git push origin pr-update-app-headers --force + + # Create PR against main + gh pr create --title "[Github Action] Update .app-headers file" \ + --body "This PR is auto-generated by a Github Action to update the .app-headers file." \ + --head pr-update-app-headers \ + --base main - # Step 6: Create Pull Request (PR) to main - - name: Create Pull Request to main - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - base: main - head: main # Direkt gegen den main Branch - title: "Update .app-headers file" - body: "Automated PR to update .app-headers file based on script changes." - draft: false # Setze auf true, wenn der PR als Draft erstellt werden soll + - name: Approve pull request + if: steps.verify-diff.outputs.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER=$(gh pr list --head "pr-update-app-headers" --json number --jq '.[].number') + if [ -n "$PR_NUMBER" ]; then + gh pr review $PR_NUMBER --approve + fi From c032db98a37c64023ad4efbf988e5fa39aa59c28 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:03:00 +0100 Subject: [PATCH 038/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 906f37349..5df67fbde 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -61,7 +61,10 @@ jobs: gh pr create --title "[Github Action] Update .app-headers file" \ --body "This PR is auto-generated by a Github Action to update the .app-headers file." \ --head pr-update-app-headers \ - --base main + --base main \ + --label "automated pr" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Approve pull request if: steps.verify-diff.outputs.changed == 'true' From 481138bff510e56e885bc30d57eee9a4d1b7a7e5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:05:14 +0100 Subject: [PATCH 039/121] Update auto-update-app-headers.yml --- .github/workflows/auto-update-app-headers.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 5df67fbde..c3b73bc3c 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -58,7 +58,7 @@ jobs: git push origin pr-update-app-headers --force # Create PR against main - gh pr create --title "[Github Action] Update .app-headers file" \ + gh pr create --title "[core] update .app-headers file" \ --body "This PR is auto-generated by a Github Action to update the .app-headers file." \ --head pr-update-app-headers \ --base main \ @@ -66,12 +66,17 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Approve pull request + - name: Re-approve pull request after update if: steps.verify-diff.outputs.changed == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_NUMBER=$(gh pr list --head "pr-update-app-headers" --json number --jq '.[].number') - if [ -n "$PR_NUMBER" ]; then - gh pr review $PR_NUMBER --approve + # Check if the PR was created by the bot (skip review if so) + PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login') + if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then + gh pr review "$PR_NUMBER" --approve + else + echo "PR was created by the bot, skipping review." fi + From 13a6e31a994c65d8e561a58e31ce73554d1f9606 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:05:26 +0100 Subject: [PATCH 040/121] Update .app-headers file (#1477) Co-authored-by: github-actions[bot] --- misc/.app-headers | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/misc/.app-headers b/misc/.app-headers index f43befdab..fb772f163 100644 --- a/misc/.app-headers +++ b/misc/.app-headers @@ -1,4 +1,4 @@ -### Generated on 01-10-2025 +### Generated on 01-14-2025 ################################################## ### 2fauth.sh @@ -529,6 +529,15 @@ APP=Frigate /_/ /_/ /_/\__, /\__,_/\__/\___/ /____/ +### ghost.sh +APP=Ghost + ________ __ + / ____/ /_ ____ _____/ /_ + / / __/ __ \/ __ \/ ___/ __/ +/ /_/ / / / / /_/ (__ ) /_ +\____/_/ /_/\____/____/\__/ + + ### gitea.sh APP=Gitea _______ __ @@ -1222,6 +1231,15 @@ APP=OneDev \____/_/ /_/\___/_____/\___/|___/ +### opengist.sh +APP=Opengist + ____ _ __ + / __ \____ ___ ____ ____ _(_)____/ /_ + / / / / __ \/ _ \/ __ \/ __ `/ / ___/ __/ +/ /_/ / /_/ / __/ / / / /_/ / (__ ) /_ +\____/ .___/\___/_/ /_/\__, /_/____/\__/ + /_/ /____/ + ### openhab.sh APP=openHAB __ _____ ____ From 2fff2079ef3ef58d01de10a627f211bce56b2c0c Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:06:28 +0100 Subject: [PATCH 041/121] Update CHANGELOG.md (#1475) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 558257269..d7c329de0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,14 @@ Do not break established syntax in this file, as it is automatically updated by - Update lazylibrarian-install.sh: Add pypdf libary [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1467](https://github.com/community-scripts/ProxmoxVE/pull/1467)) - Update opengist-install.sh: Add git as dependencie [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1471](https://github.com/community-scripts/ProxmoxVE/pull/1471)) +### 🌐 Website + +- [website] Update footer text [@rajatdiptabiswas](https://github.com/rajatdiptabiswas) ([#1466](https://github.com/community-scripts/ProxmoxVE/pull/1466)) + +### 🧰 Maintenance + +- [core] Update build.func: Fix bug with advanced tags [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1473](https://github.com/community-scripts/ProxmoxVE/pull/1473)) + ## 2025-01-13 ### Changed From 349cfb28b5da5529f1fc1ba6ea719c297ca25d46 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:23:46 +0100 Subject: [PATCH 042/121] Update tianji-install.sh: Add OPENAI_API_KEY to .env (#1480) --- install/tianji-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/tianji-install.sh b/install/tianji-install.sh index e03c09d0a..dd28ff4f0 100644 --- a/install/tianji-install.sh +++ b/install/tianji-install.sh @@ -74,6 +74,7 @@ $STD pnpm build:server echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" cat </opt/tianji/src/server/.env DATABASE_URL="postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?schema=public" +OPENAI_API_KEY="" JWT_SECRET="$TIANJI_SECRET" EOF cd /opt/tianji/src/server From 325084f8ca3e390b73520ecfdd2168ba6b19cd68 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:28:49 +0100 Subject: [PATCH 043/121] Update CHANGELOG.md (#1481) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c329de0..b93db8b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ Do not break established syntax in this file, as it is automatically updated by ### Changed +### 💥 Breaking Changes + +- Update tianji-install.sh: Add OPENAI_API_KEY to .env [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1480](https://github.com/community-scripts/ProxmoxVE/pull/1480)) + ### ✨ New Scripts - New Script: Opengist [@jd-apprentice](https://github.com/jd-apprentice) ([#1429](https://github.com/community-scripts/ProxmoxVE/pull/1429)) From 33cd0cb2f18bd8dd859b508fbca41611b547c0c0 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:32:33 +0100 Subject: [PATCH 044/121] Create New LXC: Wordpress (#1485) --- ct/wordpress.sh | 45 +++++++++++++++++++ install/wordpress-install.sh | 85 ++++++++++++++++++++++++++++++++++++ json/wordpress.json | 34 +++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 ct/wordpress.sh create mode 100644 install/wordpress-install.sh create mode 100644 json/wordpress.json diff --git a/ct/wordpress.sh b/ct/wordpress.sh new file mode 100644 index 000000000..8ff69de17 --- /dev/null +++ b/ct/wordpress.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://wordpress.org/ + +## App Default Values +APP="Wordpress" +var_tags="blog;cms" +var_disk="5" +var_cpu="2" +var_ram="2048" +var_os="debian" +var_version="12" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var/www/html/wordpress ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_error "Wordpress should be updated via the user interface." + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN} ${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/${CL}" \ No newline at end of file diff --git a/install/wordpress-install.sh b/install/wordpress-install.sh new file mode 100644 index 000000000..665b105ab --- /dev/null +++ b/install/wordpress-install.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 communtiy-scripts ORG +# Author: MickLesk (Canbiz) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://wordpress.org/ + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies (Patience)" +$STD apt-get install -y \ + curl \ + unzip \ + sudo \ + mc \ + apache2 \ + php8.2-{bcmath,common,cli,curl,fpm,gd,snmp,imap,mbstring,mysql,xml,zip} \ + libapache2-mod-php \ + mariadb-server + msg_ok "Installed Dependencies" + +msg_info "Setting up Database" +DB_NAME=wordpress_db +DB_USER=wordpress +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';" +$STD mysql -u root -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "WordPress Credentials" + echo "Database User: $DB_USER" + echo "Database Password: $DB_PASS" + echo "Database Name: $DB_NAME" +} >> ~/wordpress.creds +msg_ok "Set up Database" + +msg_info "Installing Wordpress (Patience)" +cd /var/www/html +wget -q https://wordpress.org/latest.zip +unzip -q latest.zip +chown -R www-data:www-data wordpress/ +cd /var/www/html/wordpress +find . -type d -exec chmod 755 {} \; +find . -type f -exec chmod 644 {} \; +mv wp-config-sample.php wp-config.php +sed -i -e "s|^define( 'DB_NAME', '.*' );|define( 'DB_NAME', '$DB_NAME' );|" \ + -e "s|^define( 'DB_USER', '.*' );|define( 'DB_USER', '$DB_USER' );|" \ + -e "s|^define( 'DB_PASSWORD', '.*' );|define( 'DB_PASSWORD', '$DB_PASS' );|" \ + /var/www/html/wordpress/wp-config.php +msg_ok "Installed Wordpress" + +msg_info "Setup Services" +cat < /etc/apache2/sites-available/wordpress.conf + + ServerName yourdomain.com + DocumentRoot /var/www/html/wordpress + + + AllowOverride All + + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + + +EOF +$STD a2ensite wordpress.conf +$STD a2dissite 000-default.conf +systemctl reload apache2 +msg_ok "Created Services" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf /var/www/html/latest.zip +$STD apt-get autoremove +$STD apt-get autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/json/wordpress.json b/json/wordpress.json new file mode 100644 index 000000000..b82f0c567 --- /dev/null +++ b/json/wordpress.json @@ -0,0 +1,34 @@ +{ + "name": "Wordpress", + "slug": "wordpress", + "categories": [ + 14 + ], + "date_created": "2025-01-14", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://wordpress.org/documentation/", + "website": "https://wordpress.org/", + "logo": "https://s.w.org/style/images/about/WordPress-logotype-simplified.png", + "description": "WordPress is the simplest, most popular way to create your own website or blog. In fact, WordPress powers over 43.6% of all the websites on the Internet. Yes – more than one in four websites that you visit are likely powered by WordPress.\n\nOn a slightly more technical level, WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free.", + "install_methods": [ + { + "type": "default", + "script": "ct/wordpress.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 5, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} \ No newline at end of file From cb496d74f4a7d7a42a560bd0598d9ac4c0d7e95f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:33:53 +0100 Subject: [PATCH 045/121] Update .app-headers file (#1486) Co-authored-by: github-actions[bot] --- misc/.app-headers | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/.app-headers b/misc/.app-headers index fb772f163..46ccd3fdf 100644 --- a/misc/.app-headers +++ b/misc/.app-headers @@ -1966,6 +1966,15 @@ APP=Wireguard |__/|__/_/_/ \___/\__, /\__,_/\__,_/_/ \__,_/ /____/ +### wordpress.sh +APP=Wordpress + _ __ __ +| | / /___ _________/ /___ ________ __________ +| | /| / / __ \/ ___/ __ / __ \/ ___/ _ \/ ___/ ___/ +| |/ |/ / /_/ / / / /_/ / /_/ / / / __(__ |__ ) +|__/|__/\____/_/ \__,_/ .___/_/ \___/____/____/ + /_/ + ### yunohost.sh APP=YunoHost __ __ __ __ __ From 3b1c43381e3c34898a98b396ef5db73659496d5f Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:35:22 +0100 Subject: [PATCH 046/121] Update CHANGELOG.md (#1487) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b93db8b10..556daeb4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Do not break established syntax in this file, as it is automatically updated by ### ✨ New Scripts +- New Script: Wordpress [@MickLesk](https://github.com/MickLesk) ([#1485](https://github.com/community-scripts/ProxmoxVE/pull/1485)) - New Script: Opengist [@jd-apprentice](https://github.com/jd-apprentice) ([#1429](https://github.com/community-scripts/ProxmoxVE/pull/1429)) ### 🚀 Updated Scripts From b9829165cfe23fe1ca1cf47df526aecd89461940 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:25:42 +0100 Subject: [PATCH 047/121] adjust date opengist.json --- json/opengist.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json/opengist.json b/json/opengist.json index cfb6d4ec2..d779ed29f 100644 --- a/json/opengist.json +++ b/json/opengist.json @@ -4,7 +4,7 @@ "categories": [ 3 ], - "date_created": "2025-11-01", + "date_created": "2025-01-14", "type": "ct", "updateable": false, "privileged": false, From 424dc26720f298e4de79120cb9ceea4dc9e60dfd Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:43:37 +0100 Subject: [PATCH 048/121] Hotfix build.func: Error when tags are empty (#1492) --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 0810e5011..4d29a3fe3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -636,7 +636,7 @@ advanced_settings() { TAGS="${ADV_TAGS}" # ADV_TAGS already contains "community-script" fi else - TAGS="" + TAGS="community-script;" fi echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" else From 4ce474382accf598fc4e5274cdeb64c0e010dfec Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:21:14 +0100 Subject: [PATCH 049/121] Update CHANGELOG.md (#1493) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 556daeb4f..c25028e6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Do not break established syntax in this file, as it is automatically updated by ### 🧰 Maintenance +- Hotfix build.func: Error when tags are empty [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1492](https://github.com/community-scripts/ProxmoxVE/pull/1492)) - [core] Update build.func: Fix bug with advanced tags [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1473](https://github.com/community-scripts/ProxmoxVE/pull/1473)) ## 2025-01-13 From ac61a925cc316b499fea68ac65974522fda07fda Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 09:04:52 +0100 Subject: [PATCH 050/121] Fix: Add FFMPEG for OpenWebUI (#1497) --- install/openwebui-install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install/openwebui-install.sh b/install/openwebui-install.sh index 11fa4aa67..454902568 100644 --- a/install/openwebui-install.sh +++ b/install/openwebui-install.sh @@ -15,11 +15,13 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt-get install -y curl -$STD apt-get install -y sudo -$STD apt-get install -y mc -$STD apt-get install -y gpg -$STD apt-get install -y git +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + gpg \ + git \ + ffmpeg msg_ok "Installed Dependencies" msg_info "Installing Python3 Dependencies" From c8319f044cc5fc9bf6538c7790f7faca7b488879 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 09:58:13 +0100 Subject: [PATCH 051/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 696c60257..1aa5b7d0a 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -5,6 +5,9 @@ on: types: [synchronize, opened, reopened, edited] paths: - "json/*.json" + schedule: + - cron: "0 0,6,12,18 * * *" + workflow_dispatch: jobs: update-date: @@ -13,6 +16,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} - name: Set up Python uses: actions/setup-python@v4 @@ -43,3 +48,23 @@ jobs: uses: ad-m/github-push-action@v0.6.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} + + iterate-prs: + needs: update-date + runs-on: ubuntu-latest + steps: + - name: Install GitHub CLI + run: sudo apt-get install -y gh + + - name: List all open PRs + run: | + gh pr list --state open --json number,title > pr_list.json + jq -r '.[] | .number' pr_list.json > pr_numbers.txt + + - name: Process each PR + run: | + while read pr_number; do + gh pr checkout $pr_number + git fetch origin + git checkout origin/$pr_number + done < pr_numbers.txt From 910f3bb6f414bbf8f5e3c82ce1d325b6a5034d76 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 09:58:37 +0100 Subject: [PATCH 052/121] switch shellcheck to backup --- .github/workflows/{ => backup}/shellcheck.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ => backup}/shellcheck.yml (100%) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/backup/shellcheck.yml similarity index 100% rename from .github/workflows/shellcheck.yml rename to .github/workflows/backup/shellcheck.yml From f498f349f319f9e15d0bb1be48c2572eac3965b4 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:18:33 +0100 Subject: [PATCH 053/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 38 ++++--------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 1aa5b7d0a..9c5edbaac 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -6,7 +6,7 @@ on: paths: - "json/*.json" schedule: - - cron: "0 0,6,12,18 * * *" + - cron: "0 0,6,12,18 * * *" # Viermal täglich workflow_dispatch: jobs: @@ -17,7 +17,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.pull_request.head.ref }} - name: Set up Python uses: actions/setup-python@v4 @@ -38,33 +38,11 @@ jobs: fi done - - name: Commit changes + - name: Commit and push changes + env: + GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} run: | - git config user.name "GitHub Action" - git config user.email "action@github.com" + git config user.name "GitHub Bot" + git config user.email "bot@github.com" git commit -m "Update date_created in new JSON files" || echo "No changes to commit" - - - name: Push changes - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - iterate-prs: - needs: update-date - runs-on: ubuntu-latest - steps: - - name: Install GitHub CLI - run: sudo apt-get install -y gh - - - name: List all open PRs - run: | - gh pr list --state open --json number,title > pr_list.json - jq -r '.[] | .number' pr_list.json > pr_numbers.txt - - - name: Process each PR - run: | - while read pr_number; do - gh pr checkout $pr_number - git fetch origin - git checkout origin/$pr_number - done < pr_numbers.txt + git push origin HEAD:${{ github.event.pull_request.head.ref }} From 4ae131e102059177e472b72b746af95692152c6a Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:21:44 +0100 Subject: [PATCH 054/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 48 +++++++++---------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 9c5edbaac..e6223b4c7 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,33 +1,31 @@ -name: Check and Update JSON Date +name: Update Pull Request on: - pull_request: - types: [synchronize, opened, reopened, edited] - paths: - - "json/*.json" - schedule: - - cron: "0 0,6,12,18 * * *" # Viermal täglich + push: + branches-ignore: ["main"] workflow_dispatch: jobs: - update-date: + update-pr: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.12 - - - name: Install dependencies - run: pip install jq - - - name: Find and Update JSON files in /json folder + - name: Update JSON files run: | TODAY=$(date +%Y-%m-%d) for file in $(git diff --diff-filter=A --name-only HEAD | grep '^json/.*\.json$'); do @@ -38,11 +36,11 @@ jobs: fi done - - name: Commit and push changes + - name: Commit and push changes to PR branch env: - GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + GH_TOKEN: ${{ steps.generate-token.outputs.token }} run: | - git config user.name "GitHub Bot" - git config user.email "bot@github.com" - git commit -m "Update date_created in new JSON files" || echo "No changes to commit" - git push origin HEAD:${{ github.event.pull_request.head.ref }} + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -m "Update date_created in JSON files" || echo "No changes to commit" + git push origin HEAD:${{ github.event.pull_request.head.ref }} --force From e756c49e50989d30fc3dde80140f09d1b6e61399 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:25:38 +0100 Subject: [PATCH 055/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index e6223b4c7..275a303c0 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,46 +1,47 @@ -name: Update Pull Request +name: Update "date_created" in new JSON files on: - push: - branches-ignore: ["main"] + pull_request: + types: + - opened + - synchronize workflow_dispatch: jobs: - update-pr: + update-date-created: runs-on: ubuntu-latest permissions: contents: write pull-requests: write steps: - - name: Generate a token - id: generate-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVATE_KEY }} - - - name: Checkout code + - name: Checkout PR branch uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Update JSON files + - name: Identify new JSON files + id: new-json-files run: | - TODAY=$(date +%Y-%m-%d) - for file in $(git diff --diff-filter=A --name-only HEAD | grep '^json/.*\.json$'); do - if jq -e '.date_created' $file > /dev/null 2>&1; then - echo "Updating date_created in $file" - jq --arg date "$TODAY" '.date_created = $date' $file > temp.json && mv temp.json $file - git add $file - fi + BASE_BRANCH=$(jq -r '.base.ref' < "$GITHUB_EVENT_PATH") + git fetch origin $BASE_BRANCH + NEW_JSON_FILES=$(git diff --diff-filter=A --name-only origin/$BASE_BRANCH HEAD -- 'json/*.json') + echo "NEW_JSON_FILES=$NEW_JSON_FILES" >> $GITHUB_ENV + + - name: Update date_created in new JSON files + if: env.NEW_JSON_FILES != "" + run: | + TODAY=$(date -u +%Y-%m-%d) + for file in $NEW_JSON_FILES; do + echo "Updating date_created in $file" + jq --arg date "$TODAY" '.date_created = $date' "$file" > temp.json && mv temp.json "$file" done - - name: Commit and push changes to PR branch - env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} + - name: Commit and push changes + if: env.NEW_JSON_FILES != "" run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git commit -m "Update date_created in JSON files" || echo "No changes to commit" - git push origin HEAD:${{ github.event.pull_request.head.ref }} --force + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add $NEW_JSON_FILES + git commit -m "Update date_created in new JSON files" + git push origin HEAD:${{ github.head_ref }} From dbfb72807a710f75edb30e4056c93745d5dc566b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:37:30 +0100 Subject: [PATCH 056/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 63 +++++++++---------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 275a303c0..69644a9e9 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,47 +1,42 @@ -name: Update "date_created" in new JSON files +name: Update JSON and Push Changes on: - pull_request: - types: - - opened - - synchronize - workflow_dispatch: + push: + branches: + - main jobs: - update-date-created: + update-json: runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write steps: - - name: Checkout PR branch - uses: actions/checkout@v4 + - name: Check out repository + uses: actions/checkout@v3 + + - name: Authenticate with GitHub App + uses: tibdex/github-app-token@v1 with: - fetch-depth: 0 + app_id: ${{ secrets.JSON_APP_ID }} + private_key: ${{ secrets.JSON_APP_KEY }} - - name: Identify new JSON files - id: new-json-files - run: | - BASE_BRANCH=$(jq -r '.base.ref' < "$GITHUB_EVENT_PATH") - git fetch origin $BASE_BRANCH - NEW_JSON_FILES=$(git diff --diff-filter=A --name-only origin/$BASE_BRANCH HEAD -- 'json/*.json') - echo "NEW_JSON_FILES=$NEW_JSON_FILES" >> $GITHUB_ENV - - - name: Update date_created in new JSON files - if: env.NEW_JSON_FILES != "" + - name: Modify JSON file run: | + JSON_FILE="json/mailrise.json" TODAY=$(date -u +%Y-%m-%d) - for file in $NEW_JSON_FILES; do - echo "Updating date_created in $file" - jq --arg date "$TODAY" '.date_created = $date' "$file" > temp.json && mv temp.json "$file" - done + + if [ -f "$JSON_FILE" ]; then + echo "Updating date_created in $JSON_FILE to $TODAY" + jq --arg today "$TODAY" '.date_created = $today' $JSON_FILE > tmp.json && mv tmp.json $JSON_FILE + else + echo "File $JSON_FILE does not exist." + exit 1 + fi - - name: Commit and push changes - if: env.NEW_JSON_FILES != "" + - name: Commit changes run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add $NEW_JSON_FILES - git commit -m "Update date_created in new JSON files" - git push origin HEAD:${{ github.head_ref }} + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add json/mailrise.json + git commit -m "Update date_created in mailrise.json to $TODAY" + git push origin main + From 18538897baaf1048abb1650495a0f65bfb293616 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:40:38 +0100 Subject: [PATCH 057/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 69644a9e9..cc2d8387a 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,4 +1,4 @@ -name: Update JSON and Push Changes +name: Update JSON Date and Push Changes on: push: @@ -10,33 +10,34 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check out repository - uses: actions/checkout@v3 - - - name: Authenticate with GitHub App - uses: tibdex/github-app-token@v1 + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 with: - app_id: ${{ secrets.JSON_APP_ID }} - private_key: ${{ secrets.JSON_APP_KEY }} + app-id: ${{ vars.JSON_APP_ID }} + private-key: ${{ secrets.JSON_APP_KEY }} - - name: Modify JSON file + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up authentication + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global credential.helper 'store' + echo "https://github-actions[bot]:$GH_TOKEN@github.com" > ~/.git-credentials + + - name: Modify JSON file(s) run: | - JSON_FILE="json/mailrise.json" TODAY=$(date -u +%Y-%m-%d) - - if [ -f "$JSON_FILE" ]; then - echo "Updating date_created in $JSON_FILE to $TODAY" - jq --arg today "$TODAY" '.date_created = $today' $JSON_FILE > tmp.json && mv tmp.json $JSON_FILE - else - echo "File $JSON_FILE does not exist." - exit 1 - fi + for json_file in $(find . -type f -name "*.json"); do + jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + done - name: Commit changes run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add json/mailrise.json - git commit -m "Update date_created in mailrise.json to $TODAY" + git add *.json + git commit -m "Update date_created in JSON files to $TODAY" git push origin main - From 37da2e5e1cd09e15dd9a7c61546aee6df9c3e213 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:41:47 +0100 Subject: [PATCH 058/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index cc2d8387a..bf6904367 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -14,7 +14,7 @@ jobs: id: generate-token uses: actions/create-github-app-token@v1 with: - app-id: ${{ vars.JSON_APP_ID }} + app-id: ${{ secrets.JSON_APP_ID }} private-key: ${{ secrets.JSON_APP_KEY }} - name: Checkout code From aa3a3997f07f0a0dc159dfeb2cf8feec5342c17b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:45:22 +0100 Subject: [PATCH 059/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index bf6904367..79171041d 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -33,11 +33,15 @@ jobs: run: | TODAY=$(date -u +%Y-%m-%d) for json_file in $(find . -type f -name "*.json"); do - jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + # Ensure the JSON structure is an object + if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then + # Update the date_created field + jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + fi done - name: Commit changes run: | git add *.json - git commit -m "Update date_created in JSON files to $TODAY" + git commit -m "Update date_created to $TODAY" git push origin main From 9174536e953693ec12cc06bfd98b379c395b2c26 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:50:30 +0100 Subject: [PATCH 060/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 79171041d..4d9fda5bb 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,7 +1,7 @@ name: Update JSON Date and Push Changes on: - push: + pull_request: branches: - main @@ -10,32 +10,26 @@ jobs: runs-on: ubuntu-latest steps: - - name: Generate a token - id: generate-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.JSON_APP_ID }} - private-key: ${{ secrets.JSON_APP_KEY }} - - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} - name: Set up authentication env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "json-updater-bot" + git config --global user.email "json-updater-bot@users.noreply.github.com" git config --global credential.helper 'store' - echo "https://github-actions[bot]:$GH_TOKEN@github.com" > ~/.git-credentials + echo "https://json-updater-bot:$GH_TOKEN@github.com" > ~/.git-credentials - - name: Modify JSON file(s) + - name: Modify JSON files run: | TODAY=$(date -u +%Y-%m-%d) - for json_file in $(find . -type f -name "*.json"); do - # Ensure the JSON structure is an object + # Filtern der geänderten Dateien im aktuellen PR + for json_file in $(git diff --name-only origin/main...$GITHUB_SHA | grep '.json$'); do if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then - # Update the date_created field jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" fi done @@ -44,4 +38,4 @@ jobs: run: | git add *.json git commit -m "Update date_created to $TODAY" - git push origin main + git push origin ${{ github.head_ref }} # Push direkt in den PR-Branch From e6530e14dd334a753ac2f6fe36c091a1757596b9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:52:34 +0100 Subject: [PATCH 061/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 4d9fda5bb..34b7cdbbe 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.head_ref }} - name: Set up authentication env: @@ -27,8 +27,8 @@ jobs: - name: Modify JSON files run: | TODAY=$(date -u +%Y-%m-%d) - # Filtern der geänderten Dateien im aktuellen PR - for json_file in $(git diff --name-only origin/main...$GITHUB_SHA | grep '.json$'); do + # Filtern der geänderten Dateien im aktuellen PR im Vergleich zum Basisbranch + for json_file in $(git diff --name-only ${{ github.base_ref }}...${{ github.head_ref }} | grep '.json$'); do if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" fi From c57f0be73733653f5cf32396dcc77f419fad7e6d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:54:23 +0100 Subject: [PATCH 062/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 34b7cdbbe..cd1e18417 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -27,8 +27,7 @@ jobs: - name: Modify JSON files run: | TODAY=$(date -u +%Y-%m-%d) - # Filtern der geänderten Dateien im aktuellen PR im Vergleich zum Basisbranch - for json_file in $(git diff --name-only ${{ github.base_ref }}...${{ github.head_ref }} | grep '.json$'); do + for json_file in $(find . -name "*.json"); do if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" fi From c934085b1667cdd04e67c1d10ca00e7cb3444690 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:56:24 +0100 Subject: [PATCH 063/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index cd1e18417..872f13741 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -36,5 +36,5 @@ jobs: - name: Commit changes run: | git add *.json - git commit -m "Update date_created to $TODAY" + git commit -m "Update date_created to $TODAY" || echo "No changes to commit" git push origin ${{ github.head_ref }} # Push direkt in den PR-Branch From e503ce38066198584c5572114d7ff5ae036ccf1d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 10:59:01 +0100 Subject: [PATCH 064/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 872f13741..1ee7c04c9 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,19 +1,20 @@ -name: Update JSON Date and Push Changes +name: Update JSON Date in PR on: + schedule: + - cron: '0 0,6,12,18 * * *' # Viermal täglich (Mitternacht, 6 Uhr, 12 Uhr, 18 Uhr UTC) pull_request: branches: - - main + - main # Der PR muss gegen den Main-Branch geöffnet werden jobs: - update-json: + update-json-date: runs-on: ubuntu-latest - steps: - - name: Checkout code + - name: Checkout PR branch uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.head_ref }} # Den PR-Branch auschecken - name: Set up authentication env: @@ -24,17 +25,20 @@ jobs: git config --global credential.helper 'store' echo "https://json-updater-bot:$GH_TOKEN@github.com" > ~/.git-credentials - - name: Modify JSON files + - name: Check and modify JSON files run: | TODAY=$(date -u +%Y-%m-%d) + # Überprüfen, ob JSON-Dateien vorhanden sind und das Datum setzen for json_file in $(find . -name "*.json"); do if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then - jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + current_date=$(jq -r '.date_created' "$json_file") + if [ "$current_date" != "$TODAY" ]; then + jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + git add "$json_file" + fi fi done - - name: Commit changes + - name: Commit changes if necessary run: | - git add *.json - git commit -m "Update date_created to $TODAY" || echo "No changes to commit" - git push origin ${{ github.head_ref }} # Push direkt in den PR-Branch + git diff --quiet || (git commit -m "Update date_created to $TODAY" && git push origin ${{ github.head_ref }}) From bf89a037bdc7fc330611418d82f87fce851801c5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:00:17 +0100 Subject: [PATCH 065/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 1ee7c04c9..f60cbfa78 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -28,12 +28,23 @@ jobs: - name: Check and modify JSON files run: | TODAY=$(date -u +%Y-%m-%d) - # Überprüfen, ob JSON-Dateien vorhanden sind und das Datum setzen + + # Durchsuchen der Verzeichnisse nach JSON-Dateien for json_file in $(find . -name "*.json"); do - if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then - current_date=$(jq -r '.date_created' "$json_file") + if python3 -c "import json, sys; print(json.load(sys.stdin).get('date_created'))" < "$json_file" &>/dev/null; then + current_date=$(python3 -c "import json, sys; data=json.load(sys.stdin); print(data.get('date_created'))" < "$json_file") if [ "$current_date" != "$TODAY" ]; then - jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file" + python3 -c " +import json +import sys + +# Lade die JSON-Datei +with open('$json_file', 'r+') as file: + data = json.load(file) + data['date_created'] = '$TODAY' # Setze das 'date_created' auf das heutige Datum + file.seek(0) + json.dump(data, file, indent=4) + file.truncate() # Truncate file to remove any extra content" git add "$json_file" fi fi From 41c4b11575fe7e0c1598dd83a5a0d197017ba23d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:04:03 +0100 Subject: [PATCH 066/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 49 +++++-------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index f60cbfa78..97bc74366 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,55 +1,32 @@ -name: Update JSON Date in PR +name: Update Date Created in PR on: - schedule: - - cron: '0 0,6,12,18 * * *' # Viermal täglich (Mitternacht, 6 Uhr, 12 Uhr, 18 Uhr UTC) pull_request: - branches: - - main # Der PR muss gegen den Main-Branch geöffnet werden + paths: + - '*.json' + types: [opened, synchronize] jobs: - update-json-date: + update-date: runs-on: ubuntu-latest + steps: - name: Checkout PR branch uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} # Den PR-Branch auschecken + ref: ${{ github.head_ref }} - - name: Set up authentication - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Install yq run: | - git config --global user.name "json-updater-bot" - git config --global user.email "json-updater-bot@users.noreply.github.com" - git config --global credential.helper 'store' - echo "https://json-updater-bot:$GH_TOKEN@github.com" > ~/.git-credentials + curl -sSL https://github.com/mikefarah/yq/releases/download/v4.18.1/yq_linux_amd64 -o /usr/local/bin/yq + chmod +x /usr/local/bin/yq - - name: Check and modify JSON files + - name: Update date_created in JSON run: | TODAY=$(date -u +%Y-%m-%d) - - # Durchsuchen der Verzeichnisse nach JSON-Dateien - for json_file in $(find . -name "*.json"); do - if python3 -c "import json, sys; print(json.load(sys.stdin).get('date_created'))" < "$json_file" &>/dev/null; then - current_date=$(python3 -c "import json, sys; data=json.load(sys.stdin); print(data.get('date_created'))" < "$json_file") - if [ "$current_date" != "$TODAY" ]; then - python3 -c " -import json -import sys - -# Lade die JSON-Datei -with open('$json_file', 'r+') as file: - data = json.load(file) - data['date_created'] = '$TODAY' # Setze das 'date_created' auf das heutige Datum - file.seek(0) - json.dump(data, file, indent=4) - file.truncate() # Truncate file to remove any extra content" - git add "$json_file" - fi - fi - done + yq e '.date_created = strftime("%Y-%m-%d")' -i your_file.json - name: Commit changes if necessary run: | + git status git diff --quiet || (git commit -m "Update date_created to $TODAY" && git push origin ${{ github.head_ref }}) From db6390f79124d4431ea555334ae39573c25de8d4 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:08:48 +0100 Subject: [PATCH 067/121] Update CHANGELOG.md (#1498) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25028e6d..6bf34bd16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-15 + +### Changed + +### 🚀 Updated Scripts + +- Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497)) + ## 2025-01-14 ### Changed From d18655748867318ba42019332c73f47747114589 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:09:31 +0100 Subject: [PATCH 068/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index 97bc74366..dd9c6b155 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -5,6 +5,7 @@ on: paths: - '*.json' types: [opened, synchronize] + workflow_dispatch: jobs: update-date: From 12a61a1d71fd6912285fcd2ae32cdf16d069b409 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:12:18 +0100 Subject: [PATCH 069/121] Update check_and_update_json_date.yml --- .../workflows/check_and_update_json_date.yml | 58 ++++++++++++++----- 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index dd9c6b155..d8aecb0b5 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -1,33 +1,59 @@ -name: Update Date Created in PR +name: Update date_created in JSON files on: + # Dieser Trigger wird für das Öffnen von PRs sowie für das Aktualisieren von offenen PRs verwendet pull_request: - paths: - - '*.json' types: [opened, synchronize] - workflow_dispatch: + schedule: + # Dieser Trigger wird 4x am Tag ausgelöst, um sicherzustellen, dass das Datum aktualisiert wird + - cron: "0 0,6,12,18 * * *" # Führt alle 6 Stunden aus jobs: update-date: runs-on: ubuntu-latest steps: - - name: Checkout PR branch + - name: Checkout repository uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - name: Install yq run: | - curl -sSL https://github.com/mikefarah/yq/releases/download/v4.18.1/yq_linux_amd64 -o /usr/local/bin/yq - chmod +x /usr/local/bin/yq + sudo apt-get update + sudo apt-get install -y yq - - name: Update date_created in JSON - run: | - TODAY=$(date -u +%Y-%m-%d) - yq e '.date_created = strftime("%Y-%m-%d")' -i your_file.json + - name: Set the current date + id: set_date + run: echo "TODAY=$(date -u +%Y-%m-%d)" >> $GITHUB_ENV - - name: Commit changes if necessary + - name: Check for changes in PR run: | - git status - git diff --quiet || (git commit -m "Update date_created to $TODAY" && git push origin ${{ github.head_ref }}) + # Hole den PR-Branch + PR_BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" + git fetch origin $PR_BRANCH + + # Liste alle JSON-Dateien im PR auf, die geändert wurden + CHANGED_JSON_FILES=$(git diff --name-only origin/main...$PR_BRANCH | grep '.json') + + if [ -z "$CHANGED_JSON_FILES" ]; then + echo "No JSON files changed in this PR." + exit 0 + fi + + # Gehe alle geänderten JSON-Dateien durch und aktualisiere das Datum + for file in $CHANGED_JSON_FILES; do + echo "Updating date_created in $file" + # Setze das aktuelle Datum + yq eval ".date_created = \"${{ env.TODAY }}\"" -i "$file" + git add "$file" + done + + - name: Commit and push changes + run: | + # Prüfe, ob es Änderungen gibt und committe sie + git config user.name "json-updater-bot" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git commit -m "Update date_created to ${{ env.TODAY }}" || echo "No changes to commit" + + # Push zurück in den PR-Branch + git push origin $PR_BRANCH From 69288b197f8bdf7cb4f1bbcc177d12133047220c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:13:55 +0100 Subject: [PATCH 070/121] Update check_and_update_json_date.yml --- .github/workflows/check_and_update_json_date.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/check_and_update_json_date.yml index d8aecb0b5..cde3cbbad 100644 --- a/.github/workflows/check_and_update_json_date.yml +++ b/.github/workflows/check_and_update_json_date.yml @@ -7,6 +7,7 @@ on: schedule: # Dieser Trigger wird 4x am Tag ausgelöst, um sicherzustellen, dass das Datum aktualisiert wird - cron: "0 0,6,12,18 * * *" # Führt alle 6 Stunden aus + workflow_dispatch: # Manuelle Ausführung des Workflows möglich jobs: update-date: From 4d0632fea02df9d56aa35c6266ca2bc818ce82e5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:19:32 +0100 Subject: [PATCH 071/121] Create update_json_date.sh --- .github/workflows/update_json_date.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/update_json_date.sh diff --git a/.github/workflows/update_json_date.sh b/.github/workflows/update_json_date.sh new file mode 100644 index 000000000..3b1e20615 --- /dev/null +++ b/.github/workflows/update_json_date.sh @@ -0,0 +1,27 @@ +name: Update date_created in PR JSON files + +on: + pull_request: + types: [opened, synchronize] + schedule: + - cron: "0 0,6,12,18 * * *" + workflow_dispatch: + +jobs: + update-date: + runs-on: ubuntu-latest + + steps: + - name: Checkout PR + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Install yq + run: | + sudo apt-get update + sudo apt-get install -y jq + + - name: Update date in JSON + run: | + ./update_json_date.sh From 757b5bd267631fdc211f4635609fb915e7ffa5d6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:21:26 +0100 Subject: [PATCH 072/121] Create update_json_date.sh1 --- .github/workflows/update_json_date.sh1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/update_json_date.sh1 diff --git a/.github/workflows/update_json_date.sh1 b/.github/workflows/update_json_date.sh1 new file mode 100644 index 000000000..d07eab711 --- /dev/null +++ b/.github/workflows/update_json_date.sh1 @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Verzeichnis, das die JSON-Dateien enthält +json_dir="./json/*.json" + +current_date=$(date +"%Y-%m-%d") + +for json_file in $json_dir; do + if [[ -f "$json_file" ]]; then + current_json_date=$(jq -r '.date_created' "$json_file") + + if [[ "$current_json_date" != "$current_date" ]]; then + echo "Updating $json_file with date $current_date" + jq --arg date "$current_date" '.date_created = $date' "$json_file" > temp.json && mv temp.json "$json_file" + + git add "$json_file" + git commit -m "Update date_created to $current_date in $json_file" + else + echo "Date in $json_file is already up to date." + fi + fi +done +git push origin HEAD From 0368ce36d15f5d5ed9155f5b730e99c9e49e3bcd Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:21:38 +0100 Subject: [PATCH 073/121] Rename update_json_date.sh to update_json_date.yml --- .github/workflows/{update_json_date.sh => update_json_date.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{update_json_date.sh => update_json_date.yml} (100%) diff --git a/.github/workflows/update_json_date.sh b/.github/workflows/update_json_date.yml similarity index 100% rename from .github/workflows/update_json_date.sh rename to .github/workflows/update_json_date.yml From d20d0428dce7490c7c9cbda8c63514b58f2b3f89 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:21:51 +0100 Subject: [PATCH 074/121] Rename update_json_date.sh1 to update_json_date.sh --- .github/workflows/{update_json_date.sh1 => update_json_date.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{update_json_date.sh1 => update_json_date.sh} (100%) diff --git a/.github/workflows/update_json_date.sh1 b/.github/workflows/update_json_date.sh similarity index 100% rename from .github/workflows/update_json_date.sh1 rename to .github/workflows/update_json_date.sh From d3b0becfe6391b381d7eaa12a5a5635d67c10fe6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:25:31 +0100 Subject: [PATCH 075/121] Switch from workflows to scripts folder --- .github/workflows/auto-update-app-headers.yml | 4 ++-- .github/workflows/{ => scripts}/generate-app-headers.sh | 0 .github/workflows/{ => scripts}/update_json_date.sh | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{ => scripts}/generate-app-headers.sh (100%) rename .github/workflows/{ => scripts}/update_json_date.sh (100%) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index c3b73bc3c..b02c3e619 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -34,8 +34,8 @@ jobs: # Step 4: Run the generate-app-headers.sh script to update .app-headers - name: Run generate-app-headers.sh to update .app-headers run: | - chmod +x .github/workflows/generate-app-headers.sh - .github/workflows/generate-app-headers.sh + chmod +x .github/workflows/scripts/generate-app-headers.sh + .github/workflows/scripts/generate-app-headers.sh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/generate-app-headers.sh b/.github/workflows/scripts/generate-app-headers.sh similarity index 100% rename from .github/workflows/generate-app-headers.sh rename to .github/workflows/scripts/generate-app-headers.sh diff --git a/.github/workflows/update_json_date.sh b/.github/workflows/scripts/update_json_date.sh similarity index 100% rename from .github/workflows/update_json_date.sh rename to .github/workflows/scripts/update_json_date.sh From 147ba0e78d7292e3908a39079000d25903600366 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:26:01 +0100 Subject: [PATCH 076/121] backup 2 files --- .github/workflows/{ => backup}/validate-formatting.yaml.bak | 0 .github/workflows/{ => backup}/validate-scripts.yml.bak | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ => backup}/validate-formatting.yaml.bak (100%) rename .github/workflows/{ => backup}/validate-scripts.yml.bak (100%) diff --git a/.github/workflows/validate-formatting.yaml.bak b/.github/workflows/backup/validate-formatting.yaml.bak similarity index 100% rename from .github/workflows/validate-formatting.yaml.bak rename to .github/workflows/backup/validate-formatting.yaml.bak diff --git a/.github/workflows/validate-scripts.yml.bak b/.github/workflows/backup/validate-scripts.yml.bak similarity index 100% rename from .github/workflows/validate-scripts.yml.bak rename to .github/workflows/backup/validate-scripts.yml.bak From 047667c428ddc898914fe19fdd80ff30dc89cdc2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:27:53 +0100 Subject: [PATCH 077/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 3b1e20615..2aacb340e 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -1,27 +1,25 @@ -name: Update date_created in PR JSON files +name: Update JSON Date in PR on: pull_request: - types: [opened, synchronize] + paths: + - '.github/workflows/scripts/*.sh' + - 'json/*.json' + types: [opened, synchronize, reopened] + schedule: - - cron: "0 0,6,12,18 * * *" - workflow_dispatch: + - cron: '0 */2 * * *' jobs: - update-date: + update_json: runs-on: ubuntu-latest steps: - - name: Checkout PR + - name: Check out repository uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - - name: Install yq - run: | - sudo apt-get update - sudo apt-get install -y jq + - name: Make script executable + run: chmod +x .github/workflows/scripts/update_json_date.sh - - name: Update date in JSON - run: | - ./update_json_date.sh + - name: Run the update script + run: ./.github/workflows/scripts/update_json_date.sh From 9cc07cc6e10973a7ab98927e1391346458d7494d Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:31:48 +0100 Subject: [PATCH 078/121] bak --- .github/workflows/{ => backup}/check_and_update_json_date.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ => backup}/check_and_update_json_date.yml (100%) diff --git a/.github/workflows/check_and_update_json_date.yml b/.github/workflows/backup/check_and_update_json_date.yml similarity index 100% rename from .github/workflows/check_and_update_json_date.yml rename to .github/workflows/backup/check_and_update_json_date.yml From 5c16955a8eb7ab2a43fd9417fc2c0b81b8b42c88 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:32:11 +0100 Subject: [PATCH 079/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 2aacb340e..0f9de6c48 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -3,12 +3,11 @@ name: Update JSON Date in PR on: pull_request: paths: - - '.github/workflows/scripts/*.sh' - 'json/*.json' types: [opened, synchronize, reopened] schedule: - - cron: '0 */2 * * *' + - cron: '0 */2 * * *' # Alle 2 Stunden jobs: update_json: @@ -18,8 +17,29 @@ jobs: - name: Check out repository uses: actions/checkout@v4 + - name: Configure Git user + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + + - name: Get the PR branch + run: | + echo "Fetching PR branch" + PR_BRANCH=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH") + echo "PR Branch is $PR_BRANCH" + + - name: Checkout PR branch + run: git checkout $PR_BRANCH + - name: Make script executable run: chmod +x .github/workflows/scripts/update_json_date.sh - name: Run the update script run: ./.github/workflows/scripts/update_json_date.sh + + - name: Commit changes if updated + run: | + git add *.json + git diff --cached --quiet || git commit -m "Update JSON dates" + git push + continue-on-error: true From 0f06725fdce03c5b617fa037bcdb9cd3adffecd1 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:34:20 +0100 Subject: [PATCH 080/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 0f9de6c48..4302db1fa 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -16,21 +16,14 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} # Stellt sicher, dass der PR-Branch ausgecheckt wird - name: Configure Git user run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - - name: Get the PR branch - run: | - echo "Fetching PR branch" - PR_BRANCH=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH") - echo "PR Branch is $PR_BRANCH" - - - name: Checkout PR branch - run: git checkout $PR_BRANCH - - name: Make script executable run: chmod +x .github/workflows/scripts/update_json_date.sh @@ -41,5 +34,11 @@ jobs: run: | git add *.json git diff --cached --quiet || git commit -m "Update JSON dates" + + - name: Push changes with API keys + env: + JSON_API_ID: ${{ secrets.JSON_API_ID }} + JSON_API_KEY: ${{ secrets.JSON_API_KEY }} + run: | + git remote set-url origin https://$JSON_API_ID:$JSON_API_KEY@github.com/${{ github.repository }}.git git push - continue-on-error: true From 7614034784c82a55d995bf1137b4792a750eb5c5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:36:10 +0100 Subject: [PATCH 081/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 4302db1fa..1065bc8dc 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -6,9 +6,6 @@ on: - 'json/*.json' types: [opened, synchronize, reopened] - schedule: - - cron: '0 */2 * * *' # Alle 2 Stunden - jobs: update_json: runs-on: ubuntu-latest @@ -17,7 +14,7 @@ jobs: - name: Check out repository uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} # Stellt sicher, dass der PR-Branch ausgecheckt wird + ref: ${{ github.head_ref }} - name: Configure Git user run: | From 2aed45fa61411cc27ddc8727ec216bc0fffa7fc2 Mon Sep 17 00:00:00 2001 From: Dominik Siebel <145283+dsiebel@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:01:24 +0100 Subject: [PATCH 082/121] fix: actually add the given root SSH key to the container (#1502) --- misc/build.func | 1 + misc/install.func | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/misc/build.func b/misc/build.func index 4d29a3fe3..9c7d6a93d 100644 --- a/misc/build.func +++ b/misc/build.func @@ -827,6 +827,7 @@ build_container() { export PASSWORD="$PW" export VERBOSE="$VERB" export SSH_ROOT="${SSH}" + export SSH_AUTHORIZED_KEY export CTID="$CT_ID" export CTTYPE="$CT_TYPE" export PCT_OSTYPE="$var_os" diff --git a/misc/install.func b/misc/install.func index 1a3cf5eb9..59d875660 100644 --- a/misc/install.func +++ b/misc/install.func @@ -255,4 +255,11 @@ EOF fi echo "bash -c \"\$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update chmod +x /usr/bin/update + + if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then + mkdir -p /root/.ssh + echo "${SSH_AUTHORIZED_KEY}" > /root/.ssh/authorized_keys + chmod 700 /root/.ssh + chmod 600 /root/.ssh/authorized_keys + fi } From 5da06e75e77cf45ed924f08fc6b808b1473ea43f Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:08:44 +0100 Subject: [PATCH 083/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 53 +++++++++++++++++++------- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 1065bc8dc..dbfe69f37 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -2,9 +2,12 @@ name: Update JSON Date in PR on: pull_request: - paths: - - 'json/*.json' - types: [opened, synchronize, reopened] + branches: + - main + types: + - opened + - synchronize + - reopened jobs: update_json: @@ -13,29 +16,53 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - name: Configure Git user run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - - name: Make script executable - run: chmod +x .github/workflows/scripts/update_json_date.sh + - name: Get list of changed files in PR + id: files + uses: actions/github-script@v7 + with: + script: | + const prNumber = context.payload.pull_request.number; + const prFiles = await github.rest.pulls.listFiles({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber, + }); - - name: Run the update script - run: ./.github/workflows/scripts/update_json_date.sh + // Filter for JSON files only + const changedJsonFiles = prFiles.data + .filter(file => file.filename.endsWith('.json')) + .map(file => file.filename); + + core.setOutput('changed_files', changedJsonFiles.join('\n')); + console.log('Changed JSON files:', changedJsonFiles); + + - name: Update dates in changed JSON files + run: | + changed_files="${{ steps.files.outputs.changed_files }}" + if [[ -z "$changed_files" ]]; then + echo "No JSON files changed in this PR. Exiting." + exit 0 + fi + + for file in $changed_files; do + echo "Updating $file with current date." + # Your logic to update the file + jq '.date_created = "'"$(date +%Y-%m-%d)"'"' "$file" > tmp.$$.json && mv tmp.$$.json "$file" + done - name: Commit changes if updated run: | git add *.json git diff --cached --quiet || git commit -m "Update JSON dates" - - name: Push changes with API keys + - name: Push changes env: - JSON_API_ID: ${{ secrets.JSON_API_ID }} - JSON_API_KEY: ${{ secrets.JSON_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git remote set-url origin https://$JSON_API_ID:$JSON_API_KEY@github.com/${{ github.repository }}.git git push From 959a7b4b144792678874baa3d0ecde237b264123 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:31:15 +0100 Subject: [PATCH 084/121] Update CHANGELOG.md (#1504) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf34bd16..dc39f1fff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ Do not break established syntax in this file, as it is automatically updated by - Fix: Add FFMPEG for OpenWebUI [@MickLesk](https://github.com/MickLesk) ([#1497](https://github.com/community-scripts/ProxmoxVE/pull/1497)) +### 🧰 Maintenance + +- [core] build.func&install.func: Fix ssh keynot added error [@dsiebel](https://github.com/dsiebel) ([#1502](https://github.com/community-scripts/ProxmoxVE/pull/1502)) + ## 2025-01-14 ### Changed From c45085a51d832f9f60fe8441aa170b268fd86b60 Mon Sep 17 00:00:00 2001 From: bvdberg01 <74251551+bvdberg01@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:34:02 +0100 Subject: [PATCH 085/121] New script: phpIPAM (#1503) * Added phpipam * PR feedback * fix json * Fix php version --------- Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com> --- ct/phpipam.sh | 72 ++++++++++++++++++++++++++++++++ install/phpipam-install.sh | 84 ++++++++++++++++++++++++++++++++++++++ json/phpipam.json | 34 +++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 ct/phpipam.sh create mode 100644 install/phpipam-install.sh create mode 100644 json/phpipam.json diff --git a/ct/phpipam.sh b/ct/phpipam.sh new file mode 100644 index 000000000..cf9905fde --- /dev/null +++ b/ct/phpipam.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://phpipam.net/ + +# App Default Values +APP="phpIPAM" +var_tags="network" +var_cpu="1" +var_ram="512" +var_disk="4" +var_os="debian" +var_version="12" +var_unprivileged="1" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/phpipam ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then + msg_info "Stopping Service" + systemctl stop apache2 + msg_ok "Stopped Service" + + msg_info "Updating ${APP} to v${RELEASE}" + cd /opt + mv /opt/phpipam/ /opt/phpipam-backup + wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" + unzip -q "phpipam-v${RELEASE}.zip" + cp /opt/phpipam-backup/config.php /opt/phpipam + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to v${RELEASE}" + + msg_info "Starting Service" + systemctl start apache2 + msg_ok "Started Service" + + msg_info "Cleaning up" + rm -r "/opt/phpipam-v${RELEASE}.zip" + rm -r /opt/phpipam-backup + msg_ok "Cleaned" + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at v${RELEASE}" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh new file mode 100644 index 000000000..de60381fa --- /dev/null +++ b/install/phpipam-install.sh @@ -0,0 +1,84 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: bvdberg01 +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get install -y \ + curl \ + sudo \ + mc \ + mariadb-server \ + apache2 \ + php8.2-{pdo,mysql,sockets,gmp,ldap,simplexml,json,cli,mbstring,pear,gd,curl} +msg_ok "Installed Dependencies" + +msg_info "Setting up MariaDB" +DB_NAME=phpipam +DB_USER=phpipam +DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +$STD mysql -u root -e "CREATE DATABASE $DB_NAME;" +$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');" +$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;" +{ + echo "phpIPAM-Credentials" + echo "phpIPAM Database User: $DB_USER" + echo "phpIPAM Database Password: $DB_PASS" + echo "phpIPAM Database Name: $DB_NAME" +} >> ~/phpipam.creds +msg_ok "Set up MariaDB" + +msg_info "Installing phpIPAM" +RELEASE=$(curl -s https://api.github.com/repos/phpipam/phpipam/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +cd /opt +wget -q "https://github.com/phpipam/phpipam/releases/download/v${RELEASE}/phpipam-v${RELEASE}.zip" +unzip -q "phpipam-v${RELEASE}.zip" +mysql -u root "${DB_NAME}" < /opt/phpipam/db/SCHEMA.sql +cp /opt/phpipam/config.dist.php /opt/phpipam/config.php +sed -i -e "s/\(\$disable_installer = \).*/\1true;/" \ + -e "s/\(\$db\['user'\] = \).*/\1'$DB_USER';/" \ + -e "s/\(\$db\['pass'\] = \).*/\1'$DB_PASS';/" \ + -e "s/\(\$db\['name'\] = \).*/\1'$DB_NAME';/" \ + /opt/phpipam/config.php +sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini +echo "${RELEASE}" >/opt/${APPLICATION}_version.txt +msg_ok "Installed phpIPAM" + +msg_info "Creating Service" +cat </etc/apache2/sites-available/phpipam.conf + + ServerName phpipam + DocumentRoot /opt/phpipam + + Options FollowSymLinks + AllowOverride All + Require all granted + + + ErrorLog /var/log/apache2/phpipam_error.log + CustomLog /var/log/apache2/phpipam_access.log combined + +EOF +$STD a2ensite phpipam +$STD a2enmod rewrite +$STD a2dissite 000-default.conf +$STD systemctl reload apache2 +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -rf "/opt/phpipam-v${RELEASE}.zip" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" \ No newline at end of file diff --git a/json/phpipam.json b/json/phpipam.json new file mode 100644 index 000000000..4d7d3e508 --- /dev/null +++ b/json/phpipam.json @@ -0,0 +1,34 @@ +{ + "name": "phpIPAM", + "slug": "phpipam", + "categories": [ + 11 + ], + "date_created": "2025-01-15", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://phpipam.net/documents/all-documents/", + "website": "https://phpipam.net/", + "logo": "https://phpipam.net/css/images/phpipam_logo_small@2x.png", + "description": "phpipam is an open-source web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management.", + "install_methods": [ + { + "type": "default", + "script": "ct/phpipam.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 4, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "Admin", + "password": "ipamadmin" + }, + "notes": [] +} From 75778976d0b51048b4a24b4a3ff2d03d4a2f8d35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:05:49 +0100 Subject: [PATCH 086/121] Update .app-headers file (#1518) Co-authored-by: github-actions[bot] --- misc/.app-headers | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/misc/.app-headers b/misc/.app-headers index 46ccd3fdf..a8744bdac 100644 --- a/misc/.app-headers +++ b/misc/.app-headers @@ -1,4 +1,4 @@ -### Generated on 01-14-2025 +### Generated on 01-16-2025 ################################################## ### 2fauth.sh @@ -1357,6 +1357,15 @@ APP=PhotoPrism /_/ /_/ /_/\____/\__/\____/_/ /_/ /_/____/_/ /_/ /_/ +### phpipam.sh +APP=phpIPAM + __ ________ ___ __ ___ + ____ / /_ ____ / _/ __ \/ | / |/ / + / __ \/ __ \/ __ \ / // /_/ / /| | / /|_/ / + / /_/ / / / / /_/ // // ____/ ___ |/ / / / + / .___/_/ /_/ .___/___/_/ /_/ |_/_/ /_/ +/_/ /_/ + ### pialert.sh APP=PiAlert ____ _ ___ __ __ From 14dfaa9bdebddb41ab2df524fdf2c73f1ab87764 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:13:07 +0100 Subject: [PATCH 087/121] fix php-pear & php8.2 deps --- install/phpipam-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh index de60381fa..e9cded1f5 100644 --- a/install/phpipam-install.sh +++ b/install/phpipam-install.sh @@ -19,7 +19,8 @@ $STD apt-get install -y \ mc \ mariadb-server \ apache2 \ - php8.2-{pdo,mysql,sockets,gmp,ldap,simplexml,json,cli,mbstring,pear,gd,curl} + php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \ + php-pear msg_ok "Installed Dependencies" msg_info "Setting up MariaDB" @@ -81,4 +82,4 @@ msg_info "Cleaning up" rm -rf "/opt/phpipam-v${RELEASE}.zip" $STD apt-get -y autoremove $STD apt-get -y autoclean -msg_ok "Cleaned" \ No newline at end of file +msg_ok "Cleaned" From a15a59e6153001b9e15ae3c855da4857f3bd21c2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:18:02 +0100 Subject: [PATCH 088/121] add libapache2-mod-php --- install/phpipam-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/phpipam-install.sh b/install/phpipam-install.sh index e9cded1f5..a1343c97a 100644 --- a/install/phpipam-install.sh +++ b/install/phpipam-install.sh @@ -19,6 +19,7 @@ $STD apt-get install -y \ mc \ mariadb-server \ apache2 \ + libapache2-mod-php \ php8.2 php8.2-{fpm,curl,cli,mysql,gd,intl,imap,apcu,pspell,tidy,xmlrpc,mbstring,gmp,xml,ldap,common,snmp} \ php-pear msg_ok "Installed Dependencies" From 5977f8f9363d88a4de262d20dad360a90dd8d2f2 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 09:42:03 +0100 Subject: [PATCH 089/121] Update CHANGELOG.md (#1517) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc39f1fff..02b19e720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ All LXC instances created using this repository come pre-installed with Midnight > [!IMPORTANT] Do not break established syntax in this file, as it is automatically updated by a Github Workflow +## 2025-01-16 + +### Changed + +### ✨ New Scripts + +- New script: phpIPAM [@bvdberg01](https://github.com/bvdberg01) ([#1503](https://github.com/community-scripts/ProxmoxVE/pull/1503)) + ## 2025-01-15 ### Changed From 85387563f029266e47237d067e714d27e61cd4f1 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:12:13 +0100 Subject: [PATCH 090/121] [core] Recreate Update JSON Workflow (#1523) --- .github/workflows/update_json_date.yml | 92 ++++++++++++-------------- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index dbfe69f37..6b80583e0 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -1,4 +1,4 @@ -name: Update JSON Date in PR +name: Update JSON Date on PR on: pull_request: @@ -10,59 +10,49 @@ on: - reopened jobs: - update_json: + update-json-date: runs-on: ubuntu-latest steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Configure Git user - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - - name: Get list of changed files in PR - id: files - uses: actions/github-script@v7 - with: - script: | - const prNumber = context.payload.pull_request.number; - const prFiles = await github.rest.pulls.listFiles({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: prNumber, - }); - - // Filter for JSON files only - const changedJsonFiles = prFiles.data - .filter(file => file.filename.endsWith('.json')) - .map(file => file.filename); - - core.setOutput('changed_files', changedJsonFiles.join('\n')); - console.log('Changed JSON files:', changedJsonFiles); - - - name: Update dates in changed JSON files - run: | - changed_files="${{ steps.files.outputs.changed_files }}" - if [[ -z "$changed_files" ]]; then - echo "No JSON files changed in this PR. Exiting." - exit 0 + - name: Checkout PR Branch + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - name: Update Date in JSON-Files + run: | + + BASE_BRANCH=${{ github.event.pull_request.base.ref }} + HEAD_BRANCH=${{ github.event.pull_request.head.ref }} + + git fetch origin $BASE_BRANCH + + CHANGED_FILES=$(git diff --name-only origin/$BASE_BRANCH HEAD) + + echo "Changed files: $CHANGED_FILES" + + for FILE in $CHANGED_FILES; do + if [[ "$FILE" =~ /(.*)\.sh ]]; then + echo ${BASE_REAMTCH[1]} + NAME="$(echo "${BASH_REMATCH[1]}" | sed 's/-install//')" + elif [[ "$FILE" =~ /(.*)\.json ]]; then + NAME="${BASH_REMATCH[1]}" + else + echo "no Match on $FILE" + continue fi + + JSON_FILE="json/${NAME}.json" - for file in $changed_files; do - echo "Updating $file with current date." - # Your logic to update the file - jq '.date_created = "'"$(date +%Y-%m-%d)"'"' "$file" > tmp.$$.json && mv tmp.$$.json "$file" - done + if [[ -f "$JSON_FILE" ]]; then + echo "Updating date_created in $JSON_FILE" + jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" + else + echo "JSON file $JSON_FILE not found" + fi + done + + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git diff --exit-code || git commit -am "Updating Dates in affected JSON files." + git push - - name: Commit changes if updated - run: | - git add *.json - git diff --cached --quiet || git commit -m "Update JSON dates" - - - name: Push changes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git push From f65abd9ac8536f683ef7e6f1352d83a4aee36db3 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:34:47 +0100 Subject: [PATCH 091/121] Update CHANGELOG.md (#1524) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b19e720..6b69f026f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ Do not break established syntax in this file, as it is automatically updated by - New script: phpIPAM [@bvdberg01](https://github.com/bvdberg01) ([#1503](https://github.com/community-scripts/ProxmoxVE/pull/1503)) +### 🧰 Maintenance + +- [core] Recreate Update JSON Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1523](https://github.com/community-scripts/ProxmoxVE/pull/1523)) + ## 2025-01-15 ### Changed From 8533380813060494f9b68cea9e3cb2185006f8d3 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:44:04 +0100 Subject: [PATCH 092/121] [core]Update update_json_date.yml (#1526) * [core]Update update_json_date.yml * Update update_json_date.yml --- .github/workflows/update_json_date.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 6b80583e0..2e21e3b7e 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -51,8 +51,9 @@ jobs: fi done - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" git diff --exit-code || git commit -am "Updating Dates in affected JSON files." git push - + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2551bf6f9fc4ccf517db8263bca2089a23ee10ba Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:44:24 +0100 Subject: [PATCH 093/121] [Workflow]Update autolabeler-config.json (#1525) --- .github/autolabeler-config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/autolabeler-config.json b/.github/autolabeler-config.json index 4485d62c9..30e34b972 100644 --- a/.github/autolabeler-config.json +++ b/.github/autolabeler-config.json @@ -50,7 +50,7 @@ "maintenance": [ { "fileStatus": null, - "includeGlobs": ["*.md", ".github/**"], + "includeGlobs": ["*.md", ".github/**", "misc/*.func", "ct/create_lxc.sh"], "excludeGlobs": [] } ], @@ -61,4 +61,4 @@ "excludeGlobs": [] } ] -} \ No newline at end of file +} From 9e4c62732346512394a5fc2a39b8527341423260 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:49:56 +0100 Subject: [PATCH 094/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 2e21e3b7e..31d0f32f5 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -8,6 +8,9 @@ on: - opened - synchronize - reopened +permissions: + contents: write + pull-requests: write jobs: update-json-date: @@ -18,6 +21,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Update Date in JSON-Files run: | From 24d24421d140277990f3b72caff4a526e97448fb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:52:03 +0100 Subject: [PATCH 095/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 31d0f32f5..3fdaf4d2c 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -1,5 +1,4 @@ name: Update JSON Date on PR - on: pull_request: branches: @@ -8,23 +7,18 @@ on: - opened - synchronize - reopened -permissions: - contents: write - pull-requests: write jobs: update-json-date: runs-on: ubuntu-latest - steps: - name: Checkout PR Branch uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.JSON_APP_KEY }} - name: Update Date in JSON-Files run: | - BASE_BRANCH=${{ github.event.pull_request.base.ref }} HEAD_BRANCH=${{ github.event.pull_request.head.ref }} @@ -36,7 +30,7 @@ jobs: for FILE in $CHANGED_FILES; do if [[ "$FILE" =~ /(.*)\.sh ]]; then - echo ${BASE_REAMTCH[1]} + echo ${BASH_REMATCH[1]} NAME="$(echo "${BASH_REMATCH[1]}" | sed 's/-install//')" elif [[ "$FILE" =~ /(.*)\.json ]]; then NAME="${BASH_REMATCH[1]}" @@ -46,7 +40,6 @@ jobs: fi JSON_FILE="json/${NAME}.json" - if [[ -f "$JSON_FILE" ]]; then echo "Updating date_created in $JSON_FILE" jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" @@ -55,9 +48,10 @@ jobs: fi done - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "json-updater-bot[bot]" + git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" git diff --exit-code || git commit -am "Updating Dates in affected JSON files." git push env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.JSON_APP_KEY }} + APP_ID: ${{ secrets.JSON_APP_ID }} From 6c42b5c21a1309fde2c00a68045f344ca7b33837 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:53:28 +0100 Subject: [PATCH 096/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 58 +++++++++++++++----------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 3fdaf4d2c..d0bed7e82 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -17,41 +17,49 @@ jobs: with: ref: ${{ github.head_ref }} token: ${{ secrets.JSON_APP_KEY }} - - name: Update Date in JSON-Files + fetch-depth: 0 + + - name: Check and Update New JSON Files run: | BASE_BRANCH=${{ github.event.pull_request.base.ref }} HEAD_BRANCH=${{ github.event.pull_request.head.ref }} - git fetch origin $BASE_BRANCH + # Hole die Base-Branch + git fetch origin $BASE_BRANCH - CHANGED_FILES=$(git diff --name-only origin/$BASE_BRANCH HEAD) + # Finde nur neue Dateien im PR + NEW_FILES=$(git diff --name-status origin/$BASE_BRANCH HEAD | grep "^A" | awk '{print $2}' | grep '\.json$') - echo "Changed files: $CHANGED_FILES" - - for FILE in $CHANGED_FILES; do - if [[ "$FILE" =~ /(.*)\.sh ]]; then - echo ${BASH_REMATCH[1]} - NAME="$(echo "${BASH_REMATCH[1]}" | sed 's/-install//')" - elif [[ "$FILE" =~ /(.*)\.json ]]; then - NAME="${BASH_REMATCH[1]}" - else - echo "no Match on $FILE" - continue - fi - - JSON_FILE="json/${NAME}.json" - if [[ -f "$JSON_FILE" ]]; then - echo "Updating date_created in $JSON_FILE" - jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" - else - echo "JSON file $JSON_FILE not found" + echo "New JSON files found: $NEW_FILES" + + TODAY=$(date +%Y-%m-%d) + + for FILE in $NEW_FILES; do + if [ -f "$FILE" ]; then + echo "Checking $FILE" + + # Prüfe das date_created Feld + CURRENT_DATE=$(jq -r '.date_created' "$FILE") + + if [ "$CURRENT_DATE" != "$TODAY" ]; then + echo "Updating date_created in $FILE from $CURRENT_DATE to $TODAY" + jq --arg date "$TODAY" '.date_created = $date' "$FILE" > tmp.json && mv tmp.json "$FILE" + else + echo "date_created is already set to today in $FILE" + fi fi done - + + # Nur committen wenn es Änderungen gibt git config --global user.name "json-updater-bot[bot]" git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" - git diff --exit-code || git commit -am "Updating Dates in affected JSON files." - git push + + if [[ -n $(git status -s) ]]; then + git commit -am "Update date_created to today's date in new JSON files" + git push + else + echo "No changes needed" + fi env: GH_TOKEN: ${{ secrets.JSON_APP_KEY }} APP_ID: ${{ secrets.JSON_APP_ID }} From f1f8f78420318008f92c49a8b54de52dd81a6dde Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:55:22 +0100 Subject: [PATCH 097/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index d0bed7e82..db3082557 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -18,9 +18,13 @@ jobs: ref: ${{ github.head_ref }} token: ${{ secrets.JSON_APP_KEY }} fetch-depth: 0 + persist-credentials: true - name: Check and Update New JSON Files run: | + # Konfiguriere Git mit dem Token für HTTPS + git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" + BASE_BRANCH=${{ github.event.pull_request.base.ref }} HEAD_BRANCH=${{ github.event.pull_request.head.ref }} @@ -56,10 +60,11 @@ jobs: if [[ -n $(git status -s) ]]; then git commit -am "Update date_created to today's date in new JSON files" - git push + git push origin HEAD else echo "No changes needed" fi env: GH_TOKEN: ${{ secrets.JSON_APP_KEY }} + GITHUB_TOKEN: ${{ secrets.JSON_APP_KEY }} APP_ID: ${{ secrets.JSON_APP_ID }} From f5a260a399b9b786b827389c9b42bb92f55bc6ef Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:55:54 +0100 Subject: [PATCH 098/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index db3082557..1a5176836 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -22,16 +22,10 @@ jobs: - name: Check and Update New JSON Files run: | - # Konfiguriere Git mit dem Token für HTTPS git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" - BASE_BRANCH=${{ github.event.pull_request.base.ref }} HEAD_BRANCH=${{ github.event.pull_request.head.ref }} - - # Hole die Base-Branch git fetch origin $BASE_BRANCH - - # Finde nur neue Dateien im PR NEW_FILES=$(git diff --name-status origin/$BASE_BRANCH HEAD | grep "^A" | awk '{print $2}' | grep '\.json$') echo "New JSON files found: $NEW_FILES" @@ -42,7 +36,6 @@ jobs: if [ -f "$FILE" ]; then echo "Checking $FILE" - # Prüfe das date_created Feld CURRENT_DATE=$(jq -r '.date_created' "$FILE") if [ "$CURRENT_DATE" != "$TODAY" ]; then @@ -54,7 +47,6 @@ jobs: fi done - # Nur committen wenn es Änderungen gibt git config --global user.name "json-updater-bot[bot]" git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" From 6cc4244f70c21a084444fea6cf0cfd3cf34db66b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:58:11 +0100 Subject: [PATCH 099/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 115 ++++++++++++------------- 1 file changed, 57 insertions(+), 58 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 1a5176836..b5259602e 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -1,62 +1,61 @@ name: Update JSON Date on PR on: - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened + pull_request: + branches: + - main + types: + - opened + - synchronize + - reopened + +permissions: + contents: write + pull-requests: write jobs: - update-json-date: - runs-on: ubuntu-latest - steps: - - name: Checkout PR Branch - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} - token: ${{ secrets.JSON_APP_KEY }} - fetch-depth: 0 - persist-credentials: true - - - name: Check and Update New JSON Files - run: | - git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" - BASE_BRANCH=${{ github.event.pull_request.base.ref }} - HEAD_BRANCH=${{ github.event.pull_request.head.ref }} - git fetch origin $BASE_BRANCH - NEW_FILES=$(git diff --name-status origin/$BASE_BRANCH HEAD | grep "^A" | awk '{print $2}' | grep '\.json$') - - echo "New JSON files found: $NEW_FILES" - - TODAY=$(date +%Y-%m-%d) - - for FILE in $NEW_FILES; do - if [ -f "$FILE" ]; then - echo "Checking $FILE" - - CURRENT_DATE=$(jq -r '.date_created' "$FILE") - - if [ "$CURRENT_DATE" != "$TODAY" ]; then - echo "Updating date_created in $FILE from $CURRENT_DATE to $TODAY" - jq --arg date "$TODAY" '.date_created = $date' "$FILE" > tmp.json && mv tmp.json "$FILE" - else - echo "date_created is already set to today in $FILE" - fi - fi - done - - git config --global user.name "json-updater-bot[bot]" - git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" - - if [[ -n $(git status -s) ]]; then - git commit -am "Update date_created to today's date in new JSON files" - git push origin HEAD - else - echo "No changes needed" - fi - env: - GH_TOKEN: ${{ secrets.JSON_APP_KEY }} - GITHUB_TOKEN: ${{ secrets.JSON_APP_KEY }} - APP_ID: ${{ secrets.JSON_APP_ID }} + update-json-date: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.JSON_APP_KEY }} + fetch-depth: 0 + + - run: | + echo "https://x-access-token:${GH_TOKEN}@github.com" > ~/.git-credentials + git config --global credential.helper store + git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" + + BASE_BRANCH=${{ github.event.pull_request.base.ref }} + HEAD_BRANCH=${{ github.event.pull_request.head.ref }} + + git fetch origin $BASE_BRANCH + + NEW_FILES=$(git diff --name-status origin/$BASE_BRANCH HEAD | grep "^A" | awk '{print $2}' | grep '\.json$') + + echo "New JSON files found: $NEW_FILES" + + TODAY=$(date +%Y-%m-%d) + + for FILE in $NEW_FILES; do + if [ -f "$FILE" ]; then + echo "Checking $FILE" + CURRENT_DATE=$(jq -r '.date_created' "$FILE") + if [ "$CURRENT_DATE" != "$TODAY" ]; then + echo "Updating date_created in $FILE from $CURRENT_DATE to $TODAY" + jq --arg date "$TODAY" '.date_created = $date' "$FILE" > tmp.json && mv tmp.json "$FILE" + fi + fi + done + + git config --global user.name "json-updater-bot[bot]" + git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" + + if [[ -n $(git status -s) ]]; then + git commit -am "Update date_created to today's date in new JSON files" + git push origin HEAD + fi + env: + GH_TOKEN: ${{ secrets.JSON_APP_KEY }} + GITHUB_TOKEN: ${{ secrets.JSON_APP_KEY }} + APP_ID: ${{ secrets.JSON_APP_ID }} From 786e8963b9ee2de3d1e1f4b4472a28d60a27bba9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:16:09 +0100 Subject: [PATCH 100/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 99 +++++++++++--------------- 1 file changed, 40 insertions(+), 59 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index b5259602e..4de24be93 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -1,61 +1,42 @@ -name: Update JSON Date on PR +name: Update JSON Date on: - pull_request: - branches: - - main - types: - - opened - - synchronize - - reopened - -permissions: - contents: write - pull-requests: write - + pull_request: + types: [opened, synchronize, reopened] + jobs: - update-json-date: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.JSON_APP_KEY }} - fetch-depth: 0 - - - run: | - echo "https://x-access-token:${GH_TOKEN}@github.com" > ~/.git-credentials - git config --global credential.helper store - git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/" - - BASE_BRANCH=${{ github.event.pull_request.base.ref }} - HEAD_BRANCH=${{ github.event.pull_request.head.ref }} - - git fetch origin $BASE_BRANCH - - NEW_FILES=$(git diff --name-status origin/$BASE_BRANCH HEAD | grep "^A" | awk '{print $2}' | grep '\.json$') - - echo "New JSON files found: $NEW_FILES" - - TODAY=$(date +%Y-%m-%d) - - for FILE in $NEW_FILES; do - if [ -f "$FILE" ]; then - echo "Checking $FILE" - CURRENT_DATE=$(jq -r '.date_created' "$FILE") - if [ "$CURRENT_DATE" != "$TODAY" ]; then - echo "Updating date_created in $FILE from $CURRENT_DATE to $TODAY" - jq --arg date "$TODAY" '.date_created = $date' "$FILE" > tmp.json && mv tmp.json "$FILE" - fi - fi - done - - git config --global user.name "json-updater-bot[bot]" - git config --global user.email "json-updater-bot[bot]@users.noreply.github.com" - - if [[ -n $(git status -s) ]]; then - git commit -am "Update date_created to today's date in new JSON files" - git push origin HEAD - fi - env: - GH_TOKEN: ${{ secrets.JSON_APP_KEY }} - GITHUB_TOKEN: ${{ secrets.JSON_APP_KEY }} - APP_ID: ${{ secrets.JSON_APP_ID }} + list-files: + runs-on: ubuntu-latest + steps: + - name: Checkout PR Branch + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Update JSON + id: changed-files + run: | + FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ') + echo "changed_files=${FILES}" + for FILE in $FILES; do + if [[ "$FILE" =~ /(.*)\.json ]]; then + NAME="${BASH_REMATCH[1]}" + else + echo "no new JSON in ${FILES}" + continue + fi + + JSON_FILE="json/${NAME}.json" + if [[ -f "$JSON_FILE" ]]; then + echo "Updating date_created in $JSON_FILE" + jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" + else + echo "JSON file $FILES not found" + fi + done + + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git diff --exit-code || git commit -am "Updating Dates in affected JSON files." + git push + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f9863ebf93d341fed703bb755ff44b00e65be3e Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:36:46 +0100 Subject: [PATCH 101/121] Add Mobile check for empty icon-url on website (#1532) --- frontend/src/config/siteConfig.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/config/siteConfig.tsx b/frontend/src/config/siteConfig.tsx index 6c442b651..11ee43a6c 100644 --- a/frontend/src/config/siteConfig.tsx +++ b/frontend/src/config/siteConfig.tsx @@ -2,6 +2,8 @@ import { OperatingSystem } from "@/lib/types"; import { MessagesSquare, Scroll } from "lucide-react"; import { FaDiscord, FaGithub } from "react-icons/fa"; +const isMobile = typeof window !== "undefined" && window.innerWidth < 640; + export const basePath = process.env.BASE_PATH; export const navbarLinks = [ @@ -23,13 +25,13 @@ export const navbarLinks = [ icon: , text: "Change Log", }, - { + !isMobile && { href: `https://github.com/community-scripts/${basePath}/discussions`, event: "Discussions", - icon: , + icon: , text: "Discussions", }, -]; +].filter(Boolean); export const mostPopularScripts = [ "Proxmox VE Post Install", From f5b78d5dccdc90315521f40237918dacc4efc394 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:43:53 +0100 Subject: [PATCH 102/121] fix navbar issue in mobile view --- frontend/src/config/siteConfig.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/frontend/src/config/siteConfig.tsx b/frontend/src/config/siteConfig.tsx index 11ee43a6c..3b4d1398c 100644 --- a/frontend/src/config/siteConfig.tsx +++ b/frontend/src/config/siteConfig.tsx @@ -2,10 +2,10 @@ import { OperatingSystem } from "@/lib/types"; import { MessagesSquare, Scroll } from "lucide-react"; import { FaDiscord, FaGithub } from "react-icons/fa"; -const isMobile = typeof window !== "undefined" && window.innerWidth < 640; - export const basePath = process.env.BASE_PATH; +const isMobile = typeof window !== "undefined" && window.innerWidth < 640; + export const navbarLinks = [ { href: `https://github.com/community-scripts/${basePath}`, @@ -25,13 +25,15 @@ export const navbarLinks = [ icon: , text: "Change Log", }, - !isMobile && { - href: `https://github.com/community-scripts/${basePath}/discussions`, - event: "Discussions", - icon: , - text: "Discussions", - }, -].filter(Boolean); + !isMobile + ? { + href: `https://github.com/community-scripts/${basePath}/discussions`, + event: "Discussions", + icon: , + text: "Discussions", + } + : null, +].filter(Boolean); export const mostPopularScripts = [ "Proxmox VE Post Install", From ab206530e03bd33cafd2657ba8197674f06209c5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:45:54 +0100 Subject: [PATCH 103/121] fix navbar issue in mobile view --- frontend/src/config/siteConfig.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/config/siteConfig.tsx b/frontend/src/config/siteConfig.tsx index 3b4d1398c..1a21aab69 100644 --- a/frontend/src/config/siteConfig.tsx +++ b/frontend/src/config/siteConfig.tsx @@ -33,7 +33,7 @@ export const navbarLinks = [ text: "Discussions", } : null, -].filter(Boolean); +].filter(Boolean) as { href: string; event: string; icon: JSX.Element; text: string }[]; // Typ-Anpassung nach filter(Boolean) export const mostPopularScripts = [ "Proxmox VE Post Install", From 504d47d246c7cc11943a28e3c43af6edf925af49 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:48:17 +0100 Subject: [PATCH 104/121] add react jsx --- frontend/tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index dde88af64..e789dea15 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -10,7 +10,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "preserve", + "jsx": "react-jsx", // Ändere von "preserve" zu "react-jsx" "incremental": true, "plugins": [ { @@ -27,7 +27,7 @@ "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - "next.config.mjs", + "next.config.mjs" ], "exclude": ["node_modules"] } From 330315c61566c70357bf3ef2f94c57688a1ad8bb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:48:38 +0100 Subject: [PATCH 105/121] remove comment jsx --- frontend/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index e789dea15..4b269df34 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -10,7 +10,7 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, - "jsx": "react-jsx", // Ändere von "preserve" zu "react-jsx" + "jsx": "react-jsx", "incremental": true, "plugins": [ { From 1f8f593116c0c0977e416b3c3936155c2c09c4e7 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:51:23 +0100 Subject: [PATCH 106/121] add reactmode --- frontend/src/config/siteConfig.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/config/siteConfig.tsx b/frontend/src/config/siteConfig.tsx index 1a21aab69..5a8e2fa7a 100644 --- a/frontend/src/config/siteConfig.tsx +++ b/frontend/src/config/siteConfig.tsx @@ -1,6 +1,7 @@ import { OperatingSystem } from "@/lib/types"; import { MessagesSquare, Scroll } from "lucide-react"; import { FaDiscord, FaGithub } from "react-icons/fa"; +import React from "react"; export const basePath = process.env.BASE_PATH; @@ -33,7 +34,7 @@ export const navbarLinks = [ text: "Discussions", } : null, -].filter(Boolean) as { href: string; event: string; icon: JSX.Element; text: string }[]; // Typ-Anpassung nach filter(Boolean) +].filter(Boolean) as { href: string; event: string; icon: React.ReactNode; text: string }[]; export const mostPopularScripts = [ "Proxmox VE Post Install", From b57689ec50a5076c2cb9bb45556dd6021318b001 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:01:22 +0100 Subject: [PATCH 107/121] Mainpage: Fix "Scripts by TTeck": Typo & Mobile View (#1533) --- frontend/src/app/page.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index c6fad745a..a5a152040 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -26,7 +26,6 @@ function CustomArrowRightIcon() { export default function Page() { const { theme } = useTheme(); - const [color, setColor] = useState("#000000"); useEffect(() => { @@ -51,17 +50,17 @@ export default function Page() {
❤️ - Scripts by Tteck + Scripts by tteck
@@ -70,7 +69,7 @@ export default function Page() { Thank You! - A big thank you to Tteck and the many contributors who have + A big thank you to tteck and the many contributors who have made this project possible. Your hard work is truly appreciated by the entire Proxmox community! @@ -133,7 +132,6 @@ export default function Page() { variant="expandIcon" Icon={CustomArrowRightIcon} iconPlacement="right" - className="hover:" > View Scripts From 3fca76dbbccc0ea38e3d09b6cf8720d05b0405c9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:05:48 +0100 Subject: [PATCH 108/121] Mainpage: Fix "Scripts by TTeck": Typo & Mobile View --- frontend/src/app/page.tsx | 163 +++++++++++++++----------------------- 1 file changed, 63 insertions(+), 100 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index a5a152040..2ed0369b1 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,7 +1,6 @@ "use client"; import AnimatedGradientText from "@/components/ui/animated-gradient-text"; import { Button } from "@/components/ui/button"; -import { CardFooter } from "@/components/ui/card"; import { Dialog, DialogContent, @@ -14,14 +13,14 @@ import Particles from "@/components/ui/particles"; import { Separator } from "@/components/ui/separator"; import { basePath } from "@/config/siteConfig"; import { cn } from "@/lib/utils"; -import { ArrowRightIcon, ExternalLink } from "lucide-react"; +import { ArrowRightIcon } from "lucide-react"; import { useTheme } from "next-themes"; import Link from "next/link"; import { useEffect, useState } from "react"; -import { FaGithub } from "react-icons/fa"; +import { FaGithub, FaDiscord } from "react-icons/fa"; function CustomArrowRightIcon() { - return ; + return ; } export default function Page() { @@ -33,7 +32,7 @@ export default function Page() { }, [theme]); return ( -
+
-
-
- - -
- -
- ❤️ - - Scripts by tteck - - -
- - - - Thank You! - - A big thank you to tteck and the many contributors who have - made this project possible. Your hard work is truly - appreciated by the entire Proxmox community! - - - - - - - -
- -
-

- Make managing your Homelab a breeze -

-

- We are a community-driven initiative that simplifies the setup of - Proxmox Virtual Environment (VE). -
-
- Originally created by{" "} - - tteck - - , these scripts automate and streamline -
- the process of creating and configuring Linux containers (LXC) and - virtual machines (VMs) on Proxmox VE. -
-
- With 200+ scripts to help you manage your{" "} - Proxmox VE environment.
- Whether you're a seasoned user or a newcomer, we've got - you covered. -

-
-
- - - +
+
+ + Proxmox VE Helper-Scripts + + +
+ +
+
+
+ + +
+ ❤️ Scripts by Tteck +
+
+ + + Thank You! + + A big thank you to Tteck and the many contributors who have + made this project possible. Your hard work is truly appreciated + by the entire Proxmox community! + + + +
+
+

+ Make managing your Homelab a breeze +

+

+ We are a community-driven initiative that simplifies the setup of + Proxmox Virtual Environment (VE). Originally created by{" "} + + tteck + + , these scripts automate and streamline the process of creating and + configuring Linux containers (LXC) and virtual machines (VMs) on + Proxmox VE. +

+
+ + + +
+
); } From f8c10ca80bc6d753f5b8cc1019feb0242477bf88 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:09:13 +0100 Subject: [PATCH 109/121] Update page.tsx --- frontend/src/app/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 2ed0369b1..4621ab831 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -40,22 +40,31 @@ export default function Page() { color={color} refresh /> + + {/* Header */}
+ {/* Logo */} Proxmox VE Helper-Scripts + + {/* Suchleiste */} + + {/* Icons */}
+ + {/* "Scripts by Tteck"-Button */}
@@ -75,6 +84,8 @@ export default function Page() {
+ + {/* Hauptinhalt */}

Make managing your Homelab a breeze From f51762420a0522025f783cf666e8187a650b64fe Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:13:39 +0100 Subject: [PATCH 110/121] Update page.tsx --- frontend/src/app/page.tsx | 174 ++++++++++++++++++++++---------------- 1 file changed, 101 insertions(+), 73 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 4621ab831..c6fad745a 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,6 +1,7 @@ "use client"; import AnimatedGradientText from "@/components/ui/animated-gradient-text"; import { Button } from "@/components/ui/button"; +import { CardFooter } from "@/components/ui/card"; import { Dialog, DialogContent, @@ -13,18 +14,19 @@ import Particles from "@/components/ui/particles"; import { Separator } from "@/components/ui/separator"; import { basePath } from "@/config/siteConfig"; import { cn } from "@/lib/utils"; -import { ArrowRightIcon } from "lucide-react"; +import { ArrowRightIcon, ExternalLink } from "lucide-react"; import { useTheme } from "next-themes"; import Link from "next/link"; import { useEffect, useState } from "react"; -import { FaGithub, FaDiscord } from "react-icons/fa"; +import { FaGithub } from "react-icons/fa"; function CustomArrowRightIcon() { - return ; + return ; } export default function Page() { const { theme } = useTheme(); + const [color, setColor] = useState("#000000"); useEffect(() => { @@ -32,7 +34,7 @@ export default function Page() { }, [theme]); return ( -
+
+
+
+ + +
+ +
+ ❤️ + + Scripts by Tteck + + +
+ + + + Thank You! + + A big thank you to Tteck and the many contributors who have + made this project possible. Your hard work is truly + appreciated by the entire Proxmox community! + + + + + + + +
- {/* Header */} -
-
- {/* Logo */} - - Proxmox VE Helper-Scripts - - - {/* Suchleiste */} - - - {/* Icons */} -
- - +
+

+ Make managing your Homelab a breeze +

+

+ We are a community-driven initiative that simplifies the setup of + Proxmox Virtual Environment (VE). +
+
+ Originally created by{" "} + + tteck + + , these scripts automate and streamline +
+ the process of creating and configuring Linux containers (LXC) and + virtual machines (VMs) on Proxmox VE. +
+
+ With 200+ scripts to help you manage your{" "} + Proxmox VE environment.
+ Whether you're a seasoned user or a newcomer, we've got + you covered. +

+
+
+ + +
-
- - {/* "Scripts by Tteck"-Button */} -
- - -
- ❤️ Scripts by Tteck -
-
- - - Thank You! - - A big thank you to Tteck and the many contributors who have - made this project possible. Your hard work is truly appreciated - by the entire Proxmox community! - - - -
- - {/* Hauptinhalt */} -
-

- Make managing your Homelab a breeze -

-

- We are a community-driven initiative that simplifies the setup of - Proxmox Virtual Environment (VE). Originally created by{" "} - - tteck - - , these scripts automate and streamline the process of creating and - configuring Linux containers (LXC) and virtual machines (VMs) on - Proxmox VE. -

-
- - - -
-
); } From 393f6d74c91452b531af73f6ebbc5434cde1c50c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 15:58:37 +0100 Subject: [PATCH 111/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 4de24be93..e2e0b5509 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -10,7 +10,13 @@ jobs: - name: Checkout PR Branch uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.base.ref }} + + - name: Fetch PR changes + run: | + git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git + git fetch fork ${{ github.event.pull_request.head.ref }}:pullreq + git checkout pullreq - name: Update JSON id: changed-files From 15faa76b69e5f3a303c387043ea6729f510c4afb Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:02:07 +0100 Subject: [PATCH 112/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 40 ++++++++++++++++---------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index e2e0b5509..084324d1e 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -7,42 +7,52 @@ jobs: list-files: runs-on: ubuntu-latest steps: - - name: Checkout PR Branch - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.base.ref }} + - name: Checkout base branch + uses: actions/checkout@v4 + with: + # Hier wird zunächst der base-Branch (z.B. 'main' oder 'master') ausgecheckt + ref: ${{ github.event.pull_request.base.ref }} - - name: Fetch PR changes - run: | + - name: Fetch PR changes + run: | + # Remote 'fork' zeigt auf das Repo des PR-Erstellers git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git + # Hole den Branch vom Fork und nenne ihn lokal 'pullreq' git fetch fork ${{ github.event.pull_request.head.ref }}:pullreq git checkout pullreq - - name: Update JSON - id: changed-files - run: | + - name: Update JSON + run: | + # Liste geänderte Dateien im PR auf FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ') echo "changed_files=${FILES}" + + # Für jede geänderte Datei prüfen, ob es eine .json ist. for FILE in $FILES; do if [[ "$FILE" =~ /(.*)\.json ]]; then NAME="${BASH_REMATCH[1]}" else - echo "no new JSON in ${FILES}" + echo "no new JSON in $FILE" continue fi - + JSON_FILE="json/${NAME}.json" if [[ -f "$JSON_FILE" ]]; then echo "Updating date_created in $JSON_FILE" jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" else - echo "JSON file $FILES not found" + echo "JSON file ${JSON_FILE} not found" fi done - + + # Git-Config und Commit git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" + + # Commit nur, wenn Änderungen stattgefunden haben git diff --exit-code || git commit -am "Updating Dates in affected JSON files." - git push - env: + + # WICHTIG: Upstream-Branch setzen und pushen + git push --set-upstream origin pullreq + env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 6d4eb9c3ee9ec17888961b0c4e199815b19282de Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:04:54 +0100 Subject: [PATCH 113/121] Update update_json_date.yml --- .github/workflows/update_json_date.yml | 40 ++++++++++---------------- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/.github/workflows/update_json_date.yml b/.github/workflows/update_json_date.yml index 084324d1e..afaf8eda2 100644 --- a/.github/workflows/update_json_date.yml +++ b/.github/workflows/update_json_date.yml @@ -7,52 +7,42 @@ jobs: list-files: runs-on: ubuntu-latest steps: - - name: Checkout base branch - uses: actions/checkout@v4 - with: - # Hier wird zunächst der base-Branch (z.B. 'main' oder 'master') ausgecheckt - ref: ${{ github.event.pull_request.base.ref }} + - name: Checkout PR Branch + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} - - name: Fetch PR changes - run: | - # Remote 'fork' zeigt auf das Repo des PR-Erstellers + - name: Fetch PR changes + run: | git remote add fork https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git - # Hole den Branch vom Fork und nenne ihn lokal 'pullreq' git fetch fork ${{ github.event.pull_request.head.ref }}:pullreq git checkout pullreq - - name: Update JSON - run: | - # Liste geänderte Dateien im PR auf + - name: Update JSON + id: changed-files + run: | FILES=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files --jq '.[].filename' | tr '\n' ' ') echo "changed_files=${FILES}" - - # Für jede geänderte Datei prüfen, ob es eine .json ist. for FILE in $FILES; do if [[ "$FILE" =~ /(.*)\.json ]]; then NAME="${BASH_REMATCH[1]}" else - echo "no new JSON in $FILE" + echo "no new JSON in ${FILES}" continue fi - + JSON_FILE="json/${NAME}.json" if [[ -f "$JSON_FILE" ]]; then echo "Updating date_created in $JSON_FILE" jq --arg date "$(date +%Y-%m-%d)" '.date_created = $date' "$JSON_FILE" > tmp.json && mv tmp.json "$JSON_FILE" else - echo "JSON file ${JSON_FILE} not found" + echo "JSON file $FILES not found" fi done - - # Git-Config und Commit + git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - # Commit nur, wenn Änderungen stattgefunden haben git diff --exit-code || git commit -am "Updating Dates in affected JSON files." - - # WICHTIG: Upstream-Branch setzen und pushen - git push --set-upstream origin pullreq - env: + git push + env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 258b1bd9fdd203818202ac3a87f0f9852c6f16a4 Mon Sep 17 00:00:00 2001 From: Kristian Skov Date: Thu, 16 Jan 2025 16:06:22 +0100 Subject: [PATCH 114/121] New script: Dotnet ASP.NET Web Server (#1501) * Added files * Update dotnetaspwebapi.json * Updated build.func reference back to the original repos one * Update dotnetaspwebapi.json for ubuntu 24.04 * Update dotnetaspwebapi.sh for ubuntu 24.04 * Update dotnetaspwebapi-install.sh for ubuntu 24.04 * Update install/dotnetaspwebapi-install.sh Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> * Updated for review * Fixed FTP authentication * Update dotnetaspwebapi-install.sh Changed the service name to a static one --------- Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> --- ct/dotnetaspwebapi.sh | 49 +++++++++++++ install/dotnetaspwebapi-install.sh | 110 +++++++++++++++++++++++++++++ json/dotnetaspwebapi.json | 39 ++++++++++ 3 files changed, 198 insertions(+) create mode 100644 ct/dotnetaspwebapi.sh create mode 100644 install/dotnetaspwebapi-install.sh create mode 100644 json/dotnetaspwebapi.json diff --git a/ct/dotnetaspwebapi.sh b/ct/dotnetaspwebapi.sh new file mode 100644 index 000000000..faf86d296 --- /dev/null +++ b/ct/dotnetaspwebapi.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kristian Skov +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu + +# App Default Values +APP="Dotnet ASP Web API" +var_tags="web" +var_cpu="1" +var_ram="1024" +var_disk="8" +var_os="ubuntu" +var_version="24.04" +var_unprivileged="0" + +# App Output & Base Settings +header_info "$APP" +base_settings + +# Core +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var/www ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP} LXC" + apt-get update &>/dev/null + apt-get -y upgrade &>/dev/null + msg_ok "Updated Successfully" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:80${CL}" diff --git a/install/dotnetaspwebapi-install.sh b/install/dotnetaspwebapi-install.sh new file mode 100644 index 000000000..1aeee7aa7 --- /dev/null +++ b/install/dotnetaspwebapi-install.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Kristian Skov +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<< "$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get update +$STD apt-get install -y \ + ssh \ + software-properties-common +$STD add-apt-repository -y ppa:dotnet/backports +$STD apt-get install -y \ + dotnet-sdk-9.0 \ + vsftpd \ + nginx +msg_ok "Installed Dependencies" + +msg_info "Configure Application" +var_project_name="default" +read -r -p "Type the assembly name of the project: " var_project_name +echo "Target assembly: '${var_project_name}'" +msg_ok "Application Configured" + +msg_info "Setting up FTP Server" +useradd ftpuser +FTP_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13) +usermod --password $(echo ${FTP_PASS} | openssl passwd -1 -stdin) ftpuser +mkdir -p /var/www/html +usermod -d /var/www/html ftp +usermod -d /var/www/html ftpuser +chown ftpuser /var/www/html + +sed -i "s|#write_enable=YES|write_enable=YES|g" /etc/vsftpd.conf +sed -i "s|#chroot_local_user=YES|chroot_local_user=NO|g" /etc/vsftpd.conf + +systemctl restart -q vsftpd.service + +{ + echo "FTP-Credentials" + echo "Username: ftpuser" + echo "Password: $FTP_PASS" +} >> ~/ftp.creds + +msg_ok "FTP server setup completed" + +msg_info "Setting up Nginx Server" +rm -f /var/www/html/index.nginx-debian.html + +sed "s/\$var_project_name/$var_project_name/g" >myfile <<'EOF' >/etc/nginx/sites-available/default +map $http_connection $connection_upgrade { + "~*Upgrade" $http_connection; + default keep-alive; +} +server { + listen 80; + server_name $var_project_name.com *.$var_project_name.com; + location / { + proxy_pass http://127.0.0.1:5000/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} +EOF +systemctl reload nginx +msg_ok "Nginx Server Created" + +msg_info "Creating Service" +cat </etc/systemd/system/kestrel-aspnetapi.service +[Unit] +Description=.NET Web API App running on Linux + +[Service] +WorkingDirectory=/var/www/html +ExecStart=/usr/bin/dotnet /var/www/html/$var_project_name.dll +Restart=always +# Restart service after 10 seconds if the dotnet service crashes: +RestartSec=10 +KillSignal=SIGINT +SyslogIdentifier=dotnet-${var_project_name} +User=root +Environment=ASPNETCORE_ENVIRONMENT=Production +Environment=DOTNET_NOLOGO=true + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now kestrel-aspnetapi.service +msg_ok "Created Service" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/dotnetaspwebapi.json b/json/dotnetaspwebapi.json new file mode 100644 index 000000000..46bbd30ca --- /dev/null +++ b/json/dotnetaspwebapi.json @@ -0,0 +1,39 @@ +{ + "name":"Dotnet ASP Web API", + "slug":"dotnetaspwebapi", + "categories":[ + 0 + ], + "date_created":"2025-01-15", + "type":"ct", + "updateable":true, + "privileged":true, + "interface_port":80, + "documentation":"https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu", + "website":"https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-9.0&tabs=linux-ubuntu", + "logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Microsoft_.NET_logo.svg/456px-Microsoft_.NET_logo.svg.png", + "description":"Automatically setup a ASP.NET server up, as well as a FTP server so you can publish to this container from Visual Studio.", + "install_methods":[ + { + "type":"default", + "script":"ct/dotnetaspwebapi.sh", + "resources":{ + "cpu":1, + "ram":1024, + "hdd":8, + "os":"Ubuntu", + "version":"24.04" + } + } + ], + "default_credentials":{ + "username":null, + "password":null + }, + "notes":[ + { + "text":"FTP server credentials: `cat ~/ftp.creds`", + "type":"info" + } + ] +} From 023c3fc52d00af3a9fffb7e31ddd9ece22f5d07d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:08:38 +0100 Subject: [PATCH 115/121] Update .app-headers file (#1534) Co-authored-by: github-actions[bot] --- misc/.app-headers | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/misc/.app-headers b/misc/.app-headers index a8744bdac..847a4ebfc 100644 --- a/misc/.app-headers +++ b/misc/.app-headers @@ -421,6 +421,21 @@ APP=Dockge /_____/\____/\___/_/|_|\__, /\___/ /____/ +### dotnetaspwebapi.sh +APP=Dotnet ASP Web API + ____ __ __ ___ _____ ____ _ __ __ + / __ \____ / /_____ ___ / /_ / | / ___// __ \ | | / /__ / /_ + / / / / __ \/ __/ __ \/ _ \/ __/ / /| | \__ \/ /_/ / | | /| / / _ \/ __ \ + / /_/ / /_/ / /_/ / / / __/ /_ / ___ |___/ / ____/ | |/ |/ / __/ /_/ / +/_____/\____/\__/_/ /_/\___/\__/ /_/ |_/____/_/ |__/|__/\___/_.___/ + + ___ ____ ____ + / | / __ \/ _/ + / /| | / /_/ // / + / ___ |/ ____// / +/_/ |_/_/ /___/ + + ### emby.sh APP=Emby ______ __ From 1bb911e531168693db1250a20a061998054411e5 Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:09:06 +0100 Subject: [PATCH 116/121] Update CHANGELOG.md (#1527) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b69f026f..6f40d8154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,10 +22,17 @@ Do not break established syntax in this file, as it is automatically updated by ### ✨ New Scripts +- New script: Dotnet ASP.NET Web Server [@kris701](https://github.com/kris701) ([#1501](https://github.com/community-scripts/ProxmoxVE/pull/1501)) - New script: phpIPAM [@bvdberg01](https://github.com/bvdberg01) ([#1503](https://github.com/community-scripts/ProxmoxVE/pull/1503)) +### 🌐 Website + +- Add Mobile check for empty icon-url on website [@MickLesk](https://github.com/MickLesk) ([#1532](https://github.com/community-scripts/ProxmoxVE/pull/1532)) + ### 🧰 Maintenance +- [Workflow]Update autolabeler-config.json [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1525](https://github.com/community-scripts/ProxmoxVE/pull/1525)) +- [core]Update update_json_date.yml [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1526](https://github.com/community-scripts/ProxmoxVE/pull/1526)) - [core] Recreate Update JSON Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1523](https://github.com/community-scripts/ProxmoxVE/pull/1523)) ## 2025-01-15 From 22b7155203044be61ee8d80e773807543242edab Mon Sep 17 00:00:00 2001 From: Pedro Vieira Date: Thu, 16 Jan 2025 17:33:43 +0000 Subject: [PATCH 117/121] Update jellyseerr-install.sh (#1535) --- install/jellyseerr-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/jellyseerr-install.sh b/install/jellyseerr-install.sh index 535d374f1..916f1afc1 100644 --- a/install/jellyseerr-install.sh +++ b/install/jellyseerr-install.sh @@ -24,7 +24,7 @@ msg_ok "Installed Dependencies" msg_info "Setting up Node.js Repository" mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list +echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list msg_ok "Set up Node.js Repository" msg_info "Installing Node.js" From 779721cea595b5fb70de4ac01fbd78f4dc26ba5e Mon Sep 17 00:00:00 2001 From: "community-scripts-pr-app[bot]" <189241966+community-scripts-pr-app[bot]@users.noreply.github.com> Date: Thu, 16 Jan 2025 18:35:15 +0100 Subject: [PATCH 118/121] Update CHANGELOG.md (#1538) Co-authored-by: github-actions[bot] --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f40d8154..98a625026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ Do not break established syntax in this file, as it is automatically updated by ### Changed +### 💥 Breaking Changes + +- Update jellyseerr-install.sh to use Node 22 as required by latest Jellyseerr version [@pedrovieira](https://github.com/pedrovieira) ([#1535](https://github.com/community-scripts/ProxmoxVE/pull/1535)) + ### ✨ New Scripts - New script: Dotnet ASP.NET Web Server [@kris701](https://github.com/kris701) ([#1501](https://github.com/community-scripts/ProxmoxVE/pull/1501)) From 7bb0cc32d2009cff0fb1a949fe3c5d8b7c07be43 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:46:37 +0100 Subject: [PATCH 119/121] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index f450b99b1..5b5d72e05 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,12 +8,13 @@ body: # 🐞 **Script Issue Report** Thank you for taking the time to report an issue! Please provide as much detail as possible to help us address the problem efficiently. - ## ⚠️ **IMPORTANT** + ## ⚠️ **IMPORTANT - READ FIRST** - 🔍 **Search first:** Before submitting, check if the issue has already been reported or resolved in [closed issues](https://github.com/community-scripts/ProxmoxVE/issues?q=is%3Aissue+is%3Aclosed). If found, comment on that issue instead of creating a new one. Alternatively, check the **[Discussions](https://github.com/community-scripts/ProxmoxVE/discussions)** under the *"Announcement"* or *"Guide"* categories for relevant information. - 🛠️ **Supported environments only:** Ensure you are using a default Linux distribution. Custom setups may not be supported. - 🔎 If you encounter `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, rerun the script with verbose mode before submitting the issue. - 💡 For general questions, feature requests, or suggestions, use the [Discussions section](https://github.com/community-scripts/ProxmoxVE/discussions). +--- - type: input id: guidelines From b93b1021a3ccfff0a2ed3a441e18c2d542a8555c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:46:56 +0100 Subject: [PATCH 120/121] Update bug_report.yml --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5b5d72e05..12bd44f84 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -14,8 +14,7 @@ body: - 🛠️ **Supported environments only:** Ensure you are using a default Linux distribution. Custom setups may not be supported. - 🔎 If you encounter `[ERROR] in line 23: exit code *: while executing command "$@" > /dev/null 2>&1`, rerun the script with verbose mode before submitting the issue. - 💡 For general questions, feature requests, or suggestions, use the [Discussions section](https://github.com/community-scripts/ProxmoxVE/discussions). ---- - + - type: input id: guidelines attributes: From 104955840722f2be3b042ecf0398c14708bfb61c Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:49:16 +0100 Subject: [PATCH 121/121] Update pull_request_template.md --- .github/pull_request_template.md | 39 ++++++++++++-------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8e2f5b0bc..7613cf4eb 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,39 +1,28 @@ -> **🛠️ Note:** -> We are meticulous about merging code into the main branch, so please understand that pull requests not meeting the project's standards may be rejected. It's never personal! -> 🎮 **Note for game-related scripts:** These have a lower likelihood of being merged. - ---- - ## ✍️ Description -Provide a summary of the changes made and/or reference the issue being addressed. + - - - -**_Please remove unneeded lines!_** -- Related Issue: # (issue number, if applicable) -- Related PR: # (if applicable) -- Related Discussion: []()(if applicable) +- Related Issue: # +- Related PR: # +- Related Discussion: # +- - - ---- - -## 🛠️ Type of Change -Please check the relevant options: -- [ ] Bug fix (non-breaking change that resolves an issue) -- [ ] New feature (non-breaking change that adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) -- [ ] New script (a fully functional and thoroughly tested script or set of scripts) - ---- ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: -- [ ] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) -- [ ] Testing performed (I have thoroughly tested my changes and verified expected functionality.) -- [ ] Documentation updated (I have updated any relevant documentation) +- [] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) +- [] Testing performed (I have thoroughly tested my changes and verified expected functionality.) + +## 🛠️ Type of Change +Please check the relevant options: +- [] Bug fix (non-breaking change that resolves an issue) +- [] New feature (non-breaking change that adds functionality) +- [] Breaking change (fix or feature that would cause existing functionality to change unexpectedly) +- [] New script (a fully functional and thoroughly tested script or set of scripts) --- - ## 📋 Additional Information (optional) Provide any extra context or screenshots about the feature or fix here.