From 59623f6a4646337165274a65adf763e5dee745c8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 11:56:03 +0200 Subject: [PATCH 01/29] Add Workflwo --- .github/workflows/push-to-gitea.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/push-to-gitea.yml diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml new file mode 100644 index 0000000..0accba6 --- /dev/null +++ b/.github/workflows/push-to-gitea.yml @@ -0,0 +1,24 @@ +name: Sync to Gitea + +on: + push: + branches: + - main # or whatever branch you want to sync + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout source repo + uses: actions/checkout@v4 + + - name: Push to Gitea + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@gitea.example.com/user/repo.git + git push gitea HEAD:main --force + env: + GITEA_USER: ${{ secrets.GITEA_USER }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From f0b52cd66106e588ec2939a5c27354885d5a8771 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 13 May 2025 11:59:08 +0200 Subject: [PATCH 02/29] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 729b4c1..14180e2 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ **Warning: This repository is under active development and is not intended for production use. Changes may occur at any time!** + --- ## 🔧 What is this? From ae5023cbb8c9fbb112c1e2fd90b4b7bb087548f0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 12:00:16 +0200 Subject: [PATCH 03/29] Add Workflwo --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 0accba6..7702020 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -17,7 +17,7 @@ jobs: run: | git config --global user.name "GitHub Actions" git config --global user.email "actions@github.com" - git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@gitea.example.com/user/repo.git + git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git git push gitea HEAD:main --force env: GITEA_USER: ${{ secrets.GITEA_USER }} From 561647decb2cb760d5bc472950b5aa8e53a32769 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 12:35:33 +0200 Subject: [PATCH 04/29] Add bitmagnet script --- ct/alpine-bitmagnet.sh | 62 ++++++++++++++++++++++++++ install/alpine-bitmagnet-install.sh | 69 +++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 ct/alpine-bitmagnet.sh create mode 100644 install/alpine-bitmagnet-install.sh diff --git a/ct/alpine-bitmagnet.sh b/ct/alpine-bitmagnet.sh new file mode 100644 index 0000000..332c6f5 --- /dev/null +++ b/ct/alpine-bitmagnet.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/bitmagnet-io/bitmagnet + +APP="Alpine-bitmagnet" +var_tags="${var_tags:-alpine;monitoring}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-3}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + + if [[ ! -d /opt/bitmagnet ]]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi + RELEASE=$(curl -s https://api.github.com/repos/TwiN/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + if [ "${RELEASE}" != "$(cat /opt/bitmagnet_version.txt)" ] || [ ! -f /opt/bitmagnet_version.txt ]; then + msg_info "Updating ${APP} LXC" + $STD apk -U upgrade + $STD service bitmagnet stop + mv /opt/bitmagnet/config/config.yaml /opt + rm -rf /opt/bitmagnet/* + temp_file=$(mktemp) + curl -fsSL "https://github.com/TwiN/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" + tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet + cd /opt/bitmagnet + $STD go mod tidy + CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bitmagnet . + setcap CAP_NET_RAW+ep bitmagnet + mv /opt/config.yaml config + rm -f "$temp_file" + echo "${RELEASE}" >/opt/bitmagnet_version.txt + $STD service bitmagnet start + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + + exit 0 +} + +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}http://${IP}:8080${CL}" diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh new file mode 100644 index 0000000..ebe9897 --- /dev/null +++ b/install/alpine-bitmagnet-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/bitmagnet-io/bitmagnet + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing dependencies" +$STD apk add --no-cache \ + gcc \ + musl-dev \ + git \ + iproute2-ss +$STD apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community go +msg_ok "Installed dependencies" + +msg_info "Installing PostgreSQL" +$STD apk add --no-cache \ + postgresql15 \ + postgresql15-contrib \ + postgresql15-openrc +msg_ok "Installed PostreSQL" + +RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + +msg_info "Installing bitmagnet v${RELEASE}" +fetch_and_deploy_gh_release "bitmagnet-io/bitmagnet" +cd /opt/bitmagnet +$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)" +echo "${RELEASE}" >/opt/bitmagnet_version.txt +msg_ok "Installed bitmagnet v${RELEASE}" + +msg_info "Enabling bitmagnet Service" +cat </etc/init.d/bitmagnet +#!/sbin/openrc-run +description="bitmagnet Service" +directory="/opt/bitmagnet" +command="/opt/bitmagnet/bitmagnet" +command_args="worker run --all" +command_background="true" +command_user="root" +pidfile="/var/run/bitmagnet.pid" + +depend() { + use net +} +EOF +chmod +x /etc/init.d/bitmagnet +$STD rc-update add bitmagnet default +msg_ok "Enabled bitmagnet Service" + +msg_info "Starting bitmagnet" +$STD service bitmagnet start +msg_ok "Started bitmagnet" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apk cache clean +msg_ok "Cleaned" From 007a63ee1a7c3b317bb2cb3d7e3f6064a030ebc1 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 12:51:27 +0200 Subject: [PATCH 05/29] Update Bitmagnet --- ct/alpine-bitmagnet.sh | 13 ++++--------- install/alpine-bitmagnet-install.sh | 4 +++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ct/alpine-bitmagnet.sh b/ct/alpine-bitmagnet.sh index 332c6f5..54e80f2 100644 --- a/ct/alpine-bitmagnet.sh +++ b/ct/alpine-bitmagnet.sh @@ -6,7 +6,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # Source: https://github.com/bitmagnet-io/bitmagnet APP="Alpine-bitmagnet" -var_tags="${var_tags:-alpine;monitoring}" +var_tags="${var_tags:-alpine;torrent}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" var_disk="${var_disk:-3}" @@ -26,21 +26,16 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit 1 fi - RELEASE=$(curl -s https://api.github.com/repos/TwiN/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') + RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if [ "${RELEASE}" != "$(cat /opt/bitmagnet_version.txt)" ] || [ ! -f /opt/bitmagnet_version.txt ]; then msg_info "Updating ${APP} LXC" $STD apk -U upgrade $STD service bitmagnet stop - mv /opt/bitmagnet/config/config.yaml /opt - rm -rf /opt/bitmagnet/* temp_file=$(mktemp) - curl -fsSL "https://github.com/TwiN/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" + curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet cd /opt/bitmagnet - $STD go mod tidy - CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bitmagnet . - setcap CAP_NET_RAW+ep bitmagnet - mv /opt/config.yaml config + $STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)" rm -f "$temp_file" echo "${RELEASE}" >/opt/bitmagnet_version.txt $STD service bitmagnet start diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh index ebe9897..884aed2 100644 --- a/install/alpine-bitmagnet-install.sh +++ b/install/alpine-bitmagnet-install.sh @@ -32,7 +32,9 @@ msg_ok "Installed PostreSQL" RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing bitmagnet v${RELEASE}" -fetch_and_deploy_gh_release "bitmagnet-io/bitmagnet" +temp_file=$(mktemp) +curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" +tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet cd /opt/bitmagnet $STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)" echo "${RELEASE}" >/opt/bitmagnet_version.txt From fda76afeca4a0809504c253cb4b4adf6ee72a679 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 13 May 2025 10:51:41 +0000 Subject: [PATCH 06/29] Update .app files --- ct/headers/alpine-bitmagnet | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/alpine-bitmagnet diff --git a/ct/headers/alpine-bitmagnet b/ct/headers/alpine-bitmagnet new file mode 100644 index 0000000..20b69a6 --- /dev/null +++ b/ct/headers/alpine-bitmagnet @@ -0,0 +1,6 @@ + ___ __ _ __ _ __ __ + / | / /___ (_)___ ___ / /_ (_) /_____ ___ ____ _____ _____ ___ / /_ + / /| | / / __ \/ / __ \/ _ \______/ __ \/ / __/ __ `__ \/ __ `/ __ `/ __ \/ _ \/ __/ + / ___ |/ / /_/ / / / / / __/_____/ /_/ / / /_/ / / / / / /_/ / /_/ / / / / __/ /_ +/_/ |_/_/ .___/_/_/ /_/\___/ /_.___/_/\__/_/ /_/ /_/\__,_/\__, /_/ /_/\___/\__/ + /_/ /____/ From dd0361ef5edf433227813090e0373bb2688354ea Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 12:57:21 +0200 Subject: [PATCH 07/29] Update Bitmagnet --- install/alpine-bitmagnet-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh index 884aed2..ef653f1 100644 --- a/install/alpine-bitmagnet-install.sh +++ b/install/alpine-bitmagnet-install.sh @@ -32,6 +32,7 @@ msg_ok "Installed PostreSQL" RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing bitmagnet v${RELEASE}" +mkdir /opt/bitmagnet temp_file=$(mktemp) curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet From b0bcfbb0dd7122a25c8f90582503286f70a98bab Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:27:45 +0200 Subject: [PATCH 08/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 39 +++++++++++++++++------------ 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 7702020..2cba4ce 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -1,24 +1,31 @@ -name: Sync to Gitea +name: " ⏳ Gitea Mirror Setup" on: + workflow_dispatch: + + schedule: + - cron: 0 0 * * * + push: branches: - - main # or whatever branch you want to sync + - main jobs: - sync: + build: runs-on: ubuntu-latest - steps: - - name: Checkout source repo - uses: actions/checkout@v4 - - - name: Push to Gitea - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git - git push gitea HEAD:main --force - env: - GITEA_USER: ${{ secrets.GITEA_USER }} - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + - uses: varunsridharan/action-gitea-mirror@main + name: " ⏳ Setting Up Mirror" + with: + gh_username: ${{ secrets.GH_USERNAME }} + gh_accesstoken: ${{ secrets.GH_TOKEN }} + gitea_host: ${{ secrets.GITEA_HOST }} + gitea_username: ${{ secrets.GITEA_USERNAME }} + gitea_accesstoken: ${{ secrets.GITEA_TOKEN }} + gitea_gist_prefix: "gist" + gitea_gist_surfix: "" + gistsSource: true + gistsStared: true + repositoryStared: true + repositorySource: true + repositoryForked: true From 6712baf9775e27caf8b6c3dde68d6fe3fdf2cc5b Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:29:19 +0200 Subject: [PATCH 09/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 2cba4ce..f567851 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -1,4 +1,4 @@ -name: " ⏳ Gitea Mirror Setup" +name: "Gitea Mirror Setup" on: workflow_dispatch: From 9614c05b3cf8050f7f58e71ceafa6861f6c3ce73 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:32:32 +0200 Subject: [PATCH 10/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index f567851..1ef377e 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -22,10 +22,6 @@ jobs: gitea_host: ${{ secrets.GITEA_HOST }} gitea_username: ${{ secrets.GITEA_USERNAME }} gitea_accesstoken: ${{ secrets.GITEA_TOKEN }} - gitea_gist_prefix: "gist" - gitea_gist_surfix: "" - gistsSource: true - gistsStared: true repositoryStared: true repositorySource: true repositoryForked: true From ea8e618ff6fbed899c7d487239e2c09ab1d703e8 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:33:43 +0200 Subject: [PATCH 11/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 1ef377e..1247233 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -18,7 +18,7 @@ jobs: name: " ⏳ Setting Up Mirror" with: gh_username: ${{ secrets.GH_USERNAME }} - gh_accesstoken: ${{ secrets.GH_TOKEN }} + gh_accesstoken: ${{ secrets.PAT_AUTOMERGE }} gitea_host: ${{ secrets.GITEA_HOST }} gitea_username: ${{ secrets.GITEA_USERNAME }} gitea_accesstoken: ${{ secrets.GITEA_TOKEN }} From fb93d80f9d80bf0d42f98aa9a6e1c7d30a5d6afa Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 13:34:18 +0200 Subject: [PATCH 12/29] Update Bitmagnet --- install/alpine-bitmagnet-install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh index ef653f1..fe959e8 100644 --- a/install/alpine-bitmagnet-install.sh +++ b/install/alpine-bitmagnet-install.sh @@ -27,17 +27,21 @@ $STD apk add --no-cache \ postgresql15 \ postgresql15-contrib \ postgresql15-openrc +$STD rc-update add postgresql +$STD rc-service postgresql start msg_ok "Installed PostreSQL" RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Installing bitmagnet v${RELEASE}" -mkdir /opt/bitmagnet +mkdir -p /opt/bitmagnet temp_file=$(mktemp) curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet cd /opt/bitmagnet -$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)" +$STD go build +chmod +x bitmagnet +$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'" echo "${RELEASE}" >/opt/bitmagnet_version.txt msg_ok "Installed bitmagnet v${RELEASE}" @@ -68,5 +72,6 @@ motd_ssh customize msg_info "Cleaning up" +rm -f $temp_file $STD apk cache clean msg_ok "Cleaned" From ed8ba99a71c0b7d86f1ff8488aef15710949d05d Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 13:35:54 +0200 Subject: [PATCH 13/29] Update Bitmagnet --- install/alpine-bitmagnet-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh index fe959e8..88856ce 100644 --- a/install/alpine-bitmagnet-install.sh +++ b/install/alpine-bitmagnet-install.sh @@ -24,9 +24,9 @@ msg_ok "Installed dependencies" msg_info "Installing PostgreSQL" $STD apk add --no-cache \ - postgresql15 \ - postgresql15-contrib \ - postgresql15-openrc + postgresql16 \ + postgresql16-contrib \ + postgresql16-openrc $STD rc-update add postgresql $STD rc-service postgresql start msg_ok "Installed PostreSQL" From 9894f888d5e79008435c04843d9d3e7aeefc1773 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:54:26 +0200 Subject: [PATCH 14/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 35 +++++++++++++---------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 1247233..ac7585d 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -1,27 +1,24 @@ -name: "Gitea Mirror Setup" +name: Sync to Gitea on: - workflow_dispatch: - - schedule: - - cron: 0 0 * * * - push: branches: - - main + - main # or whatever branch you want to sync jobs: - build: + sync: runs-on: ubuntu-latest + steps: - - uses: varunsridharan/action-gitea-mirror@main - name: " ⏳ Setting Up Mirror" - with: - gh_username: ${{ secrets.GH_USERNAME }} - gh_accesstoken: ${{ secrets.PAT_AUTOMERGE }} - gitea_host: ${{ secrets.GITEA_HOST }} - gitea_username: ${{ secrets.GITEA_USERNAME }} - gitea_accesstoken: ${{ secrets.GITEA_TOKEN }} - repositoryStared: true - repositorySource: true - repositoryForked: true + - name: Checkout source repo + uses: actions/checkout@v4 + + - name: Push to Gitea + run: | + git config --global user.name "Push From Github" + git config --global user.email "actions@github.com" + git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git + git push gitea HEAD:main --force + env: + GITEA_USER: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From f5603ae4db0595bc310bf8c793c72a96cbf2fcc0 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:56:48 +0200 Subject: [PATCH 15/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index ac7585d..9a33c13 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -3,7 +3,7 @@ name: Sync to Gitea on: push: branches: - - main # or whatever branch you want to sync + - main jobs: sync: From 7a8bdd8ad796572fa94115fd5d7c9c641c21e760 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:57:17 +0200 Subject: [PATCH 16/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 9a33c13..747527a 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -18,7 +18,7 @@ jobs: git config --global user.name "Push From Github" git config --global user.email "actions@github.com" git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git - git push gitea HEAD:main --force + git push gitea HEAD:main --mirror env: GITEA_USER: ${{ secrets.GITEA_USERNAME }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From 958fd42cae584e82321b8bc1de1570a6329f8026 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:57:52 +0200 Subject: [PATCH 17/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 747527a..46f1dd0 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -18,7 +18,7 @@ jobs: git config --global user.name "Push From Github" git config --global user.email "actions@github.com" git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git - git push gitea HEAD:main --mirror + git push gitea main --mirror env: GITEA_USER: ${{ secrets.GITEA_USERNAME }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From b7967013ecdc7073161a085283ab0e92eeb4e481 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:58:20 +0200 Subject: [PATCH 18/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 46f1dd0..d9e3db9 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -18,7 +18,7 @@ jobs: git config --global user.name "Push From Github" git config --global user.email "actions@github.com" git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git - git push gitea main --mirror + git push gitea --mirror env: GITEA_USER: ${{ secrets.GITEA_USERNAME }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From 99572cfe3898e96bc02610f3e25c2cdfb402ca2e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:58:55 +0200 Subject: [PATCH 19/29] Changes to gitea workflow --- .github/workflows/push-to-gitea.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index d9e3db9..92f4552 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout source repo uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Push to Gitea run: | From 955a16f9ade5d640db866006a742cecd1f262459 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 13:59:49 +0200 Subject: [PATCH 20/29] Changelog Changed --- CHANGELOG.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96b6fdd..4664e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,15 @@ -

Changelog - Develop

+

Changelog

All notable changes to this project will be documented in this file.

- ## 2025-03-24 ### 🆕 New Scripts - - fileflows [@kkroboth](https://github.com/kkroboth) ([#3392](https://github.com/community-scripts/ProxmoxVE/pull/3392)) +- fileflows [@kkroboth](https://github.com/kkroboth) ([#3392](https://github.com/community-scripts/ProxmoxVE/pull/3392)) - wazuh [@omiinaya](https://github.com/omiinaya) ([#3381](https://github.com/community-scripts/ProxmoxVE/pull/3381)) - yt-dlp-webui [@CrazyWolf13](https://github.com/CrazyWolf13) ([#3364](https://github.com/community-scripts/ProxmoxVE/pull/3364)) - Extension/New Script: Redis Alpine Installation [@MickLesk](https://github.com/MickLesk) ([#3367](https://github.com/community-scripts/ProxmoxVE/pull/3367)) @@ -20,7 +19,7 @@ ### 🚀 Updated Scripts - - License url VED to VE [@bvdberg01](https://github.com/bvdberg01) ([#3258](https://github.com/community-scripts/ProxmoxVE/pull/3258)) +- License url VED to VE [@bvdberg01](https://github.com/bvdberg01) ([#3258](https://github.com/community-scripts/ProxmoxVE/pull/3258)) - Omada jdk to jre [@bvdberg01](https://github.com/bvdberg01) ([#3319](https://github.com/community-scripts/ProxmoxVE/pull/3319)) - #### 🐞 Bug Fixes @@ -55,24 +54,24 @@ ### 🧰 Maintenance - - #### ✨ New Features +- #### ✨ New Features - - [core] add gitignore to prevent big pulls [@MickLesk](https://github.com/MickLesk) ([#3278](https://github.com/community-scripts/ProxmoxVE/pull/3278)) - - [core] install core deps (debian / ubuntu) [@MickLesk](https://github.com/MickLesk) ([#3366](https://github.com/community-scripts/ProxmoxVE/pull/3366)) + - [core] add gitignore to prevent big pulls [@MickLesk](https://github.com/MickLesk) ([#3278](https://github.com/community-scripts/ProxmoxVE/pull/3278)) + - [core] install core deps (debian / ubuntu) [@MickLesk](https://github.com/MickLesk) ([#3366](https://github.com/community-scripts/ProxmoxVE/pull/3366)) - - #### 💾 Core +- #### 💾 Core - - [core] extend hardware transcoding for fileflows #3392 [@MickLesk](https://github.com/MickLesk) ([#3396](https://github.com/community-scripts/ProxmoxVE/pull/3396)) - - Clarify MTU in advanced Settings. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#3296](https://github.com/community-scripts/ProxmoxVE/pull/3296)) + - [core] extend hardware transcoding for fileflows #3392 [@MickLesk](https://github.com/MickLesk) ([#3396](https://github.com/community-scripts/ProxmoxVE/pull/3396)) + - Clarify MTU in advanced Settings. [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#3296](https://github.com/community-scripts/ProxmoxVE/pull/3296)) - - #### 📂 Github +- #### 📂 Github - - [core] cleanup - remove old backups of workflow files [@MickLesk](https://github.com/MickLesk) ([#3247](https://github.com/community-scripts/ProxmoxVE/pull/3247)) - - Refactor Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#3371](https://github.com/community-scripts/ProxmoxVE/pull/3371)) + - [core] cleanup - remove old backups of workflow files [@MickLesk](https://github.com/MickLesk) ([#3247](https://github.com/community-scripts/ProxmoxVE/pull/3247)) + - Refactor Changelog Workflow [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#3371](https://github.com/community-scripts/ProxmoxVE/pull/3371)) ### 🌐 Website - - Update siteConfig.tsx to use new analytics code [@BramSuurdje](https://github.com/BramSuurdje) ([#3389](https://github.com/community-scripts/ProxmoxVE/pull/3389)) +- Update siteConfig.tsx to use new analytics code [@BramSuurdje](https://github.com/BramSuurdje) ([#3389](https://github.com/community-scripts/ProxmoxVE/pull/3389)) - Bump next from 15.1.3 to 15.2.3 in /frontend [@dependabot[bot]](https://github.com/dependabot[bot]) ([#3316](https://github.com/community-scripts/ProxmoxVE/pull/3316)) - #### 🐞 Bug Fixes @@ -92,4 +91,4 @@ ## 2025-03-03 -### 🚀 Initial Release \ No newline at end of file +### 🚀 Initial Release From 2b2bd7739e5cc7b43c003fe3bc8c3df83e9ec355 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 13 May 2025 14:04:08 +0200 Subject: [PATCH 21/29] Update odoo-install.sh --- install/odoo-install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install/odoo-install.sh b/install/odoo-install.sh index 3b24784..8a02728 100644 --- a/install/odoo-install.sh +++ b/install/odoo-install.sh @@ -53,11 +53,10 @@ msg_ok "Cloned Odoo Repository" setup_uv msg_info "Creating Python Virtual Environment" -uv venv /opt/odoo/.venv -source /opt/odoo/.venv/bin/activate -#uv sync --all-extras -uv pip install --upgrade pip wheel -uv pip install -r /opt/odoo/odoo/requirements.txt +$STD uv venv /opt/odoo/.venv +$STD source /opt/odoo/.venv/bin/activate +$STD uv pip install --upgrade pip wheel +$STD uv pip install -r /opt/odoo/odoo/requirements.txt msg_ok "Created and populated Python venv" msg_info "Creating Configuration File" @@ -86,7 +85,7 @@ Type=simple User=odoo Group=odoo Environment="PATH=/opt/odoo/.venv/bin:/usr/local/bin:/usr/bin" -ExecStart=/opt/odoo/.venv/bin/python3 /opt/odoo/odoo/odoo-bin -config /opt/odoo/odoo.conf +ExecStart=/opt/odoo/.venv/bin/python3 /opt/odoo/odoo/odoo-bin -c /opt/odoo/odoo.conf Restart=on-failure [Install] From fd5a5fe520794591751788e3b02109246411a84a Mon Sep 17 00:00:00 2001 From: "michel.roegl-brunner" Date: Tue, 13 May 2025 14:04:34 +0200 Subject: [PATCH 22/29] CHANGELOG.md aktualisiert --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4664e8d..cab235e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ -

Changelog

+

All notable changes to this project will be documented in this file.

From 0af4ec541fcd3b5c55f1d69aa1e2fa7c550e7699 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 14:15:07 +0200 Subject: [PATCH 23/29] Update Bitmagnet --- ct/alpine-bitmagnet.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/ct/alpine-bitmagnet.sh b/ct/alpine-bitmagnet.sh index 54e80f2..2d98840 100644 --- a/ct/alpine-bitmagnet.sh +++ b/ct/alpine-bitmagnet.sh @@ -31,11 +31,38 @@ function update_script() { msg_info "Updating ${APP} LXC" $STD apk -U upgrade $STD service bitmagnet stop + $STD su - postgres -c "pg_dump \ + --column-inserts \ + --data-only \ + --on-conflict-do-nothing \ + --rows-per-insert=1000 \ + --table=metadata_sources \ + --table=content \ + --table=content_attributes \ + --table=content_collections \ + --table=content_collections_content \ + --table=torrent_sources \ + --table=torrents \ + --table=torrent_files \ + --table=torrent_hints \ + --table=torrent_contents \ + --table=torrent_tags \ + --table=torrents_torrent_sources \ + --table=key_values \ + bitmagnet \ + >/tmp/backup.sql" + mv /tmp/backup.sql /opt/ + [ -f /opt/bitmagnet/.env ] && cp /opt/bitmagnet/.env /opt/ + [ -f /opt/bitmagnet/config.yml ] && cp /opt/bitmagnet/config.yml /opt/ + rm -rf /opt/bitmagnet/* temp_file=$(mktemp) curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet cd /opt/bitmagnet - $STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)" + $STD go build + chmod +x bitmagnet + [ -f "/opt/.env" ] && cp "/opt/.env" /opt/bitmagnet/ + [ -f "/opt/config.yml" ] && cp "/opt/config.yml" /opt/bitmagnet/ rm -f "$temp_file" echo "${RELEASE}" >/opt/bitmagnet_version.txt $STD service bitmagnet start @@ -54,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 IP:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3333${CL}" From 98daf9bc56cc8c2b72e2212e76b4456304848c2b Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 14:17:17 +0200 Subject: [PATCH 24/29] Update Bitmagnet --- install/alpine-bitmagnet-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-bitmagnet-install.sh b/install/alpine-bitmagnet-install.sh index 88856ce..3ec3099 100644 --- a/install/alpine-bitmagnet-install.sh +++ b/install/alpine-bitmagnet-install.sh @@ -72,6 +72,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -f $temp_file +rm -f "$temp_file" $STD apk cache clean msg_ok "Cleaned" From c3f73291a3fc2a0c6fb419986491ce1e692d689d Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 14:19:16 +0200 Subject: [PATCH 25/29] Changes to Workfows --- .github/workflows/auto-update-app-headers.yml | 9 +- .github/workflows/autolabeler.yml | 11 +- .github/workflows/changelog-pr.yaml | 2 +- .github/workflows/close-discussion.yaml | 1 + .github/workflows/close-ttek-issue.yaml | 5 +- .../create-ready-for-testing-message.yml | 2 +- .github/workflows/delete-discord-thread.yml | 3 +- .github/workflows/delete_new_script.yaml | 2 +- .github/workflows/frontend-cicd.yml | 5 +- .github/workflows/get-versions-from-gh.yaml | 7 +- .../get-versions-from-newreleases.yaml | 1 + .github/workflows/move-to-main-repo.yaml | 2 +- .github/workflows/push-to-gitea.yml | 3 +- .github/workflows/script-test.yaml | 132 +++++++++--------- 14 files changed, 96 insertions(+), 89 deletions(-) diff --git a/.github/workflows/auto-update-app-headers.yml b/.github/workflows/auto-update-app-headers.yml index 5e447ea..541442d 100644 --- a/.github/workflows/auto-update-app-headers.yml +++ b/.github/workflows/auto-update-app-headers.yml @@ -5,11 +5,12 @@ on: branches: - main paths: - - 'ct/**.sh' - workflow_dispatch: + - "ct/**.sh" + workflow_dispatch: jobs: update-app-files: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest permissions: @@ -79,7 +80,7 @@ jobs: --label "automated pr" env: GH_TOKEN: ${{ steps.generate-token.outputs.token }} - + - name: Approve pull request if: env.changed == 'true' env: @@ -89,7 +90,7 @@ jobs: if [ -n "$PR_NUMBER" ]; then gh pr review $PR_NUMBER --approve fi - + - name: Re-approve pull request after update if: env.changed == 'true' env: diff --git a/.github/workflows/autolabeler.yml b/.github/workflows/autolabeler.yml index 013c40b..149382c 100644 --- a/.github/workflows/autolabeler.yml +++ b/.github/workflows/autolabeler.yml @@ -7,6 +7,7 @@ on: jobs: autolabeler: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest permissions: pull-requests: write @@ -42,9 +43,9 @@ jobs: pull_number: prNumber, }); const prFiles = prListFilesResponse.data; - - + + // Apply labels based on file changes for (const [label, rules] of Object.entries(autolabelerConfig)) { const shouldAddLabel = prFiles.some((prFile) => { @@ -66,17 +67,17 @@ jobs: "✨ **New feature**": "feature", "💥 **Breaking change**": "breaking change", }; - + for (const [checkbox, label] of Object.entries(templateLabelMappings)) { const escapedCheckbox = checkbox.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); const regex = new RegExp(`- \\[(x|X)\\]\\s*.*${escapedCheckbox}`, "i"); - const match = prBody.match(regex); + const match = prBody.match(regex); if (match) { console.log(`Match: ${match}`); labelsToAdd.add(label); } } - + console.log(`Labels to add: ${Array.from(labelsToAdd).join(", ")}`); if (labelsToAdd.size > 0) { diff --git a/.github/workflows/changelog-pr.yaml b/.github/workflows/changelog-pr.yaml index c8fa281..ec4d7d7 100644 --- a/.github/workflows/changelog-pr.yaml +++ b/.github/workflows/changelog-pr.yaml @@ -7,7 +7,7 @@ on: jobs: update-changelog-pull-request: - if: github.repository == 'community-scripts/ProxmoxVE' + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest env: CONFIG_PATH: .github/changelog-pr-config.json diff --git a/.github/workflows/close-discussion.yaml b/.github/workflows/close-discussion.yaml index 80a3f50..9b0352f 100644 --- a/.github/workflows/close-discussion.yaml +++ b/.github/workflows/close-discussion.yaml @@ -11,6 +11,7 @@ permissions: jobs: close-discussion: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/close-ttek-issue.yaml b/.github/workflows/close-ttek-issue.yaml index a71622e..037d607 100644 --- a/.github/workflows/close-ttek-issue.yaml +++ b/.github/workflows/close-ttek-issue.yaml @@ -6,6 +6,7 @@ on: jobs: close_tteck_issues: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: - name: Auto-close if tteck script detected @@ -22,12 +23,12 @@ jobs: This repository is no longer used for active scripts. **Please update your bookmarks** and use: [https://helper-scripts.com](https://helper-scripts.com) - + Also make sure your Bash command starts with: \`\`\`bash bash <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/...) \`\`\` - + This issue is being closed automatically.`; await github.rest.issues.createComment({ diff --git a/.github/workflows/create-ready-for-testing-message.yml b/.github/workflows/create-ready-for-testing-message.yml index 4c1770b..939bb04 100644 --- a/.github/workflows/create-ready-for-testing-message.yml +++ b/.github/workflows/create-ready-for-testing-message.yml @@ -11,7 +11,7 @@ permissions: jobs: post_to_discord: runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'Ready For Testing') + if: contains(github.event.issue.labels.*.name, 'Ready For Testing') && github.repository == 'community-scripts/ProxmoxVED' steps: - name: Extract Issue Title (Lowercase & Underscores) id: extract_title diff --git a/.github/workflows/delete-discord-thread.yml b/.github/workflows/delete-discord-thread.yml index 92972e6..19e3608 100644 --- a/.github/workflows/delete-discord-thread.yml +++ b/.github/workflows/delete-discord-thread.yml @@ -7,13 +7,14 @@ on: jobs: close_discord_thread: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: - name: Get thread-ID op and close thread run: | ISSUE_TITLE="${{ github.event.issue.title }}" - + THREAD_ID=$(curl -s -X GET "https://discord.com/api/v10/guilds/${{ secrets.DISCORD_GUILD_ID }}/threads/active" \ -H "Authorization: Bot ${{ secrets.DISCORD_BOT_TOKEN }}" \ -H "Content-Type: application/json" | \ diff --git a/.github/workflows/delete_new_script.yaml b/.github/workflows/delete_new_script.yaml index 0f05c83..d938ea5 100644 --- a/.github/workflows/delete_new_script.yaml +++ b/.github/workflows/delete_new_script.yaml @@ -7,7 +7,7 @@ on: jobs: delete-files: runs-on: ubuntu-latest - if: contains(github.event.issue.labels.*.name, 'Started Migration To ProxmoxVE') + if: contains(github.event.issue.labels.*.name, 'Started Migration To ProxmoxVE') && github.repository == 'community-scripts/ProxmoxVED' steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/frontend-cicd.yml b/.github/workflows/frontend-cicd.yml index 4eb3676..6adaf0c 100644 --- a/.github/workflows/frontend-cicd.yml +++ b/.github/workflows/frontend-cicd.yml @@ -25,10 +25,11 @@ concurrency: jobs: build: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest defaults: run: - working-directory: frontend # Set default working directory for all run steps + working-directory: frontend # Set default working directory for all run steps steps: - name: Checkout uses: actions/checkout@v4 @@ -63,7 +64,7 @@ jobs: deploy: runs-on: ubuntu-latest needs: build - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' && github.repository == 'community-scripts/ProxmoxVED' permissions: pages: write id-token: write diff --git a/.github/workflows/get-versions-from-gh.yaml b/.github/workflows/get-versions-from-gh.yaml index 71b6add..d3cd7e3 100644 --- a/.github/workflows/get-versions-from-gh.yaml +++ b/.github/workflows/get-versions-from-gh.yaml @@ -12,6 +12,7 @@ permissions: jobs: crawl-versions: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: @@ -32,10 +33,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ls + ls - chmod +x .github/workflows/scripts/get-gh-release.sh - .github/workflows/scripts/get-gh-release.sh + chmod +x .github/workflows/scripts/get-gh-release.sh + .github/workflows/scripts/get-gh-release.sh - name: Commit JSON env: diff --git a/.github/workflows/get-versions-from-newreleases.yaml b/.github/workflows/get-versions-from-newreleases.yaml index 293ca72..9c4a833 100644 --- a/.github/workflows/get-versions-from-newreleases.yaml +++ b/.github/workflows/get-versions-from-newreleases.yaml @@ -12,6 +12,7 @@ permissions: jobs: crawl-versions: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index 63595f5..d06ce04 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -14,7 +14,7 @@ permissions: jobs: move-to-main-repo: runs-on: ubuntu-latest - if: github.event.label.name == 'Migration To ProxmoxVE' + if: github.event.label.name == 'Migration To ProxmoxVE' && github.repository == 'community-scripts/ProxmoxVED' steps: - name: Generate a token id: app-token diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 92f4552..04a0135 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -7,6 +7,7 @@ on: jobs: sync: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: ubuntu-latest steps: @@ -19,7 +20,7 @@ jobs: run: | git config --global user.name "Push From Github" git config --global user.email "actions@github.com" - git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git + git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git git push gitea --mirror env: GITEA_USER: ${{ secrets.GITEA_USERNAME }} diff --git a/.github/workflows/script-test.yaml b/.github/workflows/script-test.yaml index b41c20e..e9798ae 100644 --- a/.github/workflows/script-test.yaml +++ b/.github/workflows/script-test.yaml @@ -1,16 +1,17 @@ name: Run Scripts on PVE Node for testing permissions: - pull-requests: write + pull-requests: write on: pull_request_target: branches: - main paths: - - 'install/**.sh' - - 'ct/**.sh' + - "install/**.sh" + - "ct/**.sh" jobs: run-install-script: + if: github.repository == 'community-scripts/ProxmoxVED' runs-on: pvenode steps: - name: Checkout PR branch @@ -39,7 +40,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get scripts id: check-install-script run: | @@ -62,73 +62,73 @@ jobs: id: run-install continue-on-error: true run: | - set +e - #run for each files in /ct - for FILE in ${{ env.ALL_FILES }}; do - STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') - echo "Running Test for: $STRIPPED_NAME" - if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "$FILE"; then - echo "The script contains an interactive prompt. Skipping execution." + set +e + #run for each files in /ct + for FILE in ${{ env.ALL_FILES }}; do + STRIPPED_NAME=$(basename "$FILE" | sed 's/-install//' | sed 's/\.sh$//') + echo "Running Test for: $STRIPPED_NAME" + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "$FILE"; then + echo "The script contains an interactive prompt. Skipping execution." + continue + fi + if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then + CT_SCRIPT="ct/$STRIPPED_NAME.sh" + if [[ ! -f $CT_SCRIPT ]]; then + echo "No CT script found for $STRIPPED_NAME" + ERROR_MSG="No CT script found for $FILE" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log continue fi - if [[ $FILE =~ ^install/.*-install\.sh$ ]]; then - CT_SCRIPT="ct/$STRIPPED_NAME.sh" - if [[ ! -f $CT_SCRIPT ]]; then - echo "No CT script found for $STRIPPED_NAME" - ERROR_MSG="No CT script found for $FILE" - echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "install/$STRIPPED_NAME-install.sh"; then + echo "The script contains an interactive prompt. Skipping execution." continue fi - if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "install/$STRIPPED_NAME-install.sh"; then - echo "The script contains an interactive prompt. Skipping execution." - continue - fi - echo "Found CT script for $STRIPPED_NAME" - chmod +x "$CT_SCRIPT" - RUNNING_FILE=$CT_SCRIPT - elif [[ $FILE =~ ^ct/.*\.sh$ ]]; then - INSTALL_SCRIPT="install/$STRIPPED_NAME-install.sh" - if [[ ! -f $INSTALL_SCRIPT ]]; then - echo "No install script found for $STRIPPED_NAME" - ERROR_MSG="No install script found for $FILE" - echo "$ERROR_MSG" > result_$STRIPPED_NAME.log - continue - fi - echo "Found install script for $STRIPPED_NAME" - chmod +x "$INSTALL_SCRIPT" - RUNNING_FILE=$FILE - if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "ct/$STRIPPED_NAME.sh"; then - echo "The script contains an interactive prompt. Skipping execution." - continue - fi - fi - git remote add community-scripts https://github.com/community-scripts/ProxmoxVE.git - git fetch community-scripts - rm -f .github/workflows/scripts/app-test/pr-build.func || true - rm -f .github/workflows/scripts/app-test/pr-install.func || true - rm -f .github/workflows/scripts/app-test/pr-alpine-install.func || true - rm -f .github/workflows/scripts/app-test/pr-create-lxc.sh || true - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-build.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func - git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh - chmod +x $RUNNING_FILE - chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh - chmod +x .github/workflows/scripts/app-test/pr-install.func - chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func - chmod +x .github/workflows/scripts/app-test/pr-build.func - sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" - echo "Executing $RUNNING_FILE" - export TERM=xterm-256color - ./$RUNNING_FILE - ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) - echo "Finished running $FILE" - if [ -n "$ERROR_MSG" ]; then - echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" + echo "Found CT script for $STRIPPED_NAME" + chmod +x "$CT_SCRIPT" + RUNNING_FILE=$CT_SCRIPT + elif [[ $FILE =~ ^ct/.*\.sh$ ]]; then + INSTALL_SCRIPT="install/$STRIPPED_NAME-install.sh" + if [[ ! -f $INSTALL_SCRIPT ]]; then + echo "No install script found for $STRIPPED_NAME" + ERROR_MSG="No install script found for $FILE" echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + continue fi - done - set -e # Restore exit-on-error + echo "Found install script for $STRIPPED_NAME" + chmod +x "$INSTALL_SCRIPT" + RUNNING_FILE=$FILE + if grep -E -q 'read\s+-r\s+-p\s+".*"\s+\w+' "ct/$STRIPPED_NAME.sh"; then + echo "The script contains an interactive prompt. Skipping execution." + continue + fi + fi + git remote add community-scripts https://github.com/community-scripts/ProxmoxVE.git + git fetch community-scripts + rm -f .github/workflows/scripts/app-test/pr-build.func || true + rm -f .github/workflows/scripts/app-test/pr-install.func || true + rm -f .github/workflows/scripts/app-test/pr-alpine-install.func || true + rm -f .github/workflows/scripts/app-test/pr-create-lxc.sh || true + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-build.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-alpine-install.func + git checkout community-scripts/main -- .github/workflows/scripts/app-test/pr-create-lxc.sh + chmod +x $RUNNING_FILE + chmod +x .github/workflows/scripts/app-test/pr-create-lxc.sh + chmod +x .github/workflows/scripts/app-test/pr-install.func + chmod +x .github/workflows/scripts/app-test/pr-alpine-install.func + chmod +x .github/workflows/scripts/app-test/pr-build.func + sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|source .github/workflows/scripts/app-test/pr-build.func|g' "$RUNNING_FILE" + echo "Executing $RUNNING_FILE" + export TERM=xterm-256color + ./$RUNNING_FILE + ERROR_MSG=$(./$RUNNING_FILE 2>&1 > /dev/null) + echo "Finished running $FILE" + if [ -n "$ERROR_MSG" ]; then + echo "ERROR in $STRIPPED_NAME: $ERROR_MSG" + echo "$ERROR_MSG" > result_$STRIPPED_NAME.log + fi + done + set -e # Restore exit-on-error - name: Cleanup PVE Node run: | @@ -175,5 +175,3 @@ jobs: done echo "ERROR=$ERROR" >> $GITHUB_ENV - - From 2ec7ee9d88ea03b3dac629c03e5296e167aa9172 Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 14:24:59 +0200 Subject: [PATCH 26/29] Add json for Bitmagnet --- frontend/public/json/bitmagnet.json | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 frontend/public/json/bitmagnet.json diff --git a/frontend/public/json/bitmagnet.json b/frontend/public/json/bitmagnet.json new file mode 100644 index 0000000..8d24713 --- /dev/null +++ b/frontend/public/json/bitmagnet.json @@ -0,0 +1,46 @@ +{ + "name": "Alpine-bitmagnet", + "slug": "alpine-bitmagnet", + "categories": [ + 11 + ], + "date_created": "2025-05-13", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8080, + "documentation": "https://bitmagnet.io/setup.html", + "website": "https://bitmagnet.io/", + "logo": "https://github.com/bitmagnet-io/bitmagnet/blob/main/webui/public/magnet.svg", + "config_path": "`/opt/bitmagnet/config.yml` or `/opt/bitmagnet/.env`", + "description": "A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.", + "install_methods": [ + { + "type": "default", + "script": "ct/alpine-bitmagnet.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 3, + "os": "alpine", + "version": "3.21" + } + }, + { + "type": "alpine", + "script": "ct/alpine-bitmagnet.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 3, + "os": "alpine", + "version": "3.21" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} From 2b5fdfb2be40280a1782822021b91dd098f9d4ff Mon Sep 17 00:00:00 2001 From: tremor021 Date: Tue, 13 May 2025 14:25:34 +0200 Subject: [PATCH 27/29] Add json for Bitmagnet --- frontend/public/json/bitmagnet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/bitmagnet.json b/frontend/public/json/bitmagnet.json index 8d24713..fb3df62 100644 --- a/frontend/public/json/bitmagnet.json +++ b/frontend/public/json/bitmagnet.json @@ -1,6 +1,6 @@ { - "name": "Alpine-bitmagnet", - "slug": "alpine-bitmagnet", + "name": "Bitmagnet", + "slug": "bitmagnet", "categories": [ 11 ], From 1bae3612a843b008e75119b7b78bc316cf5c0dd0 Mon Sep 17 00:00:00 2001 From: "app-header-generator[bot]" <194485257+app-header-generator[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 14:40:30 +0200 Subject: [PATCH 28/29] Update versions.json (#324) Co-authored-by: GitHub Actions[bot] --- frontend/public/json/versions.json | 115 ++++++++++++++++++----------- 1 file changed, 70 insertions(+), 45 deletions(-) diff --git a/frontend/public/json/versions.json b/frontend/public/json/versions.json index 91a43ee..216e997 100644 --- a/frontend/public/json/versions.json +++ b/frontend/public/json/versions.json @@ -1,4 +1,44 @@ [ + { + "name": "theonedev/onedev", + "version": "v11.9.6", + "date": "2025-05-13T12:16:17Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.2.7rc1", + "date": "2025-05-13T11:55:32Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.3.0-alpha.4", + "date": "2025-05-13T11:18:29Z" + }, + { + "name": "firefly-iii/firefly-iii", + "version": "v6.2.12", + "date": "2025-04-20T19:22:17Z" + }, + { + "name": "cross-seed/cross-seed", + "version": "v6.12.4", + "date": "2025-05-11T11:41:32Z" + }, + { + "name": "element-hq/synapse", + "version": "v1.129.0", + "date": "2025-05-06T12:28:54Z" + }, + { + "name": "Jackett/Jackett", + "version": "v0.22.1893", + "date": "2025-05-13T05:57:50Z" + }, + { + "name": "zitadel/zitadel", + "version": "v2.65.9", + "date": "2025-05-13T05:14:39Z" + }, { "name": "ollama/ollama", "version": "v0.6.9-rc0", @@ -14,6 +54,11 @@ "version": "4.8.11.0", "date": "2025-03-10T06:39:11Z" }, + { + "name": "keycloak/keycloak", + "version": "26.2.4", + "date": "2025-05-08T09:10:10Z" + }, { "name": "leiweibau/Pi.Alert", "version": "v2025-05-11", @@ -89,21 +134,11 @@ "version": "1.0.0", "date": "2025-05-12T07:39:23Z" }, - { - "name": "firefly-iii/firefly-iii", - "version": "v6.2.12", - "date": "2025-04-20T19:22:17Z" - }, { "name": "umami-software/umami", "version": "v2.18.1", "date": "2025-05-12T07:16:12Z" }, - { - "name": "Jackett/Jackett", - "version": "v0.22.1891", - "date": "2025-05-12T05:53:07Z" - }, { "name": "esphome/esphome", "version": "2025.4.2", @@ -129,21 +164,11 @@ "version": "v1.35.1.5034", "date": "2025-04-30T11:02:36Z" }, - { - "name": "cross-seed/cross-seed", - "version": "v6.12.4", - "date": "2025-05-11T11:41:32Z" - }, { "name": "authelia/authelia", "version": "v4.39.3", "date": "2025-05-11T11:12:15Z" }, - { - "name": "theonedev/onedev", - "version": "v11.9.5", - "date": "2025-05-11T10:50:37Z" - }, { "name": "Radarr/Radarr", "version": "v5.22.4.9896", @@ -194,21 +219,11 @@ "version": "2025.5.1", "date": "2025-05-09T15:05:54Z" }, - { - "name": "keycloak/keycloak", - "version": "26.2.4", - "date": "2025-05-08T09:10:10Z" - }, { "name": "crowdsecurity/crowdsec", "version": "v1.6.8", "date": "2025-03-25T13:33:10Z" }, - { - "name": "zitadel/zitadel", - "version": "v3.0.4", - "date": "2025-05-09T11:38:33Z" - }, { "name": "pocket-id/pocket-id", "version": "v0.53.0", @@ -274,11 +289,6 @@ "version": "v5.7.5", "date": "2025-05-07T14:01:45Z" }, - { - "name": "Graylog2/graylog2-server", - "version": "6.3.0-alpha.3", - "date": "2025-05-07T13:58:36Z" - }, { "name": "glpi-project/glpi", "version": "10.0.18", @@ -314,11 +324,6 @@ "version": "338", "date": "2025-05-07T10:43:29Z" }, - { - "name": "zabbix/zabbix", - "version": "7.4.0beta2", - "date": "2025-05-07T10:39:21Z" - }, { "name": "jupyter/notebook", "version": "@jupyter-notebook/ui-components@7.5.0-alpha.0", @@ -364,11 +369,6 @@ "version": "v0.107.61", "date": "2025-04-22T12:42:26Z" }, - { - "name": "element-hq/synapse", - "version": "v1.129.0", - "date": "2025-05-06T12:28:54Z" - }, { "name": "Luligu/matterbridge", "version": "3.0.1", @@ -468,5 +468,30 @@ "name": "rogerfar/rdt-client", "version": "v2.0.111", "date": "2025-05-03T16:25:30Z" + }, + { + "name": "blakeblackshear/frigate", + "version": "v0.14.1", + "date": "2024-08-29T22:32:51Z" + }, + { + "name": "kimai/kimai", + "version": "2.33.0", + "date": "2025-05-03T10:33:49Z" + }, + { + "name": "documenso/documenso", + "version": "v1.10.3", + "date": "2025-05-02T23:23:25Z" + }, + { + "name": "prometheus/prometheus", + "version": "v0.304.0-rc.0", + "date": "2025-05-02T17:29:18Z" + }, + { + "name": "jhuckaby/Cronicle", + "version": "v0.9.80", + "date": "2025-05-02T16:48:15Z" } ] From 1f2be368fc3b16f9a32f5bfb42c29a43b10c7099 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 13 May 2025 15:05:41 +0200 Subject: [PATCH 29/29] Fix typo in workflow --- .github/workflows/move-to-main-repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index d06ce04..6c3b3ac 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -154,7 +154,7 @@ jobs: fi fi else - cp ../frontend/public/json/$json_name frontend/public/json/. || true + cp ../frontend/public/json/$json_file frontend/public/json/. || true fi sed -i 's|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)|source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)|' ct/$script_name.sh