diff --git a/.dappnode_profile b/.dappnode_profile index 538e868..ece7e1b 100755 --- a/.dappnode_profile +++ b/.dappnode_profile @@ -14,6 +14,8 @@ export DAPPMANAGER_VERSION="${DAPPMANAGER_VERSION:-0.2.99}" export WIFI_VERSION="${WIFI_VERSION:-0.2.9}" export WIREGUARD_VERSION="${WIREGUARD_VERSION:-0.1.3}" export HTTPS_VERSION="${HTTPS:-0.2.2}" +export NOTIFICATIONS_VERSION="/ipfs/QmQubxH4WgqEFxvFntef4H2DmuU6mxBRS6XeuShc3owNi9" +export PREMIUM_VERSION="/ipfs/QmXDddoa56HkrvtkGsa3mozpsn9SzQZtoVBWgagcW6SsHy" export DAPPNODE_DIR="/usr/src/dappnode" export DAPPNODE_CORE_DIR="${DAPPNODE_DIR}/DNCORE" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94223b5..ad7c934 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,12 @@ on: vpn: description: "Version of the OpenVPN Package. Only numbers" required: true + notifications: + description: "IPFS hash of the Notifications Package. Must start with /ipfs/" + required: true + premium: + description: "IPFS hash of the Premium Package. Must start with /ipfs/" + required: true jobs: set-versions: @@ -39,13 +45,16 @@ jobs: wireguard: ${{ steps.set_outputs.outputs.wireguard }} https: ${{ steps.set_outputs.outputs.https }} vpn: ${{ steps.set_outputs.outputs.vpn }} + notifications: ${{ steps.set_outputs.outputs.notifications }} + premium: ${{ steps.set_outputs.outputs.premium }} core: ${{ steps.set_outputs.outputs.core }} steps: - name: Check versions regex run: | [[ "${{ github.event.inputs.bind }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.ipfs }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.dappmanager }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ [[ "${{ github.event.inputs.wifi }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.wireguard }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.https }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ - [[ "${{ github.event.inputs.vpn }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.core }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "versions introduced in wrong format"; exit 1; } + [[ "${{ github.event.inputs.vpn }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.event.inputs.core }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ + [[ "${{ github.event.inputs.notifications }}" =~ ^/ipfs/.+$ ]] && [[ "${{ github.event.inputs.premium }}" =~ ^/ipfs/.+$ ]] || { echo "versions introduced in wrong format"; exit 1; } - name: Checkout uses: actions/checkout@v4 - name: Set new versions @@ -56,7 +65,9 @@ jobs: sed -i -e "/DAPPMANAGER_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.dappmanager }}"/" .dappnode_profile sed -i -e "/WIFI_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wifi }}"/" .dappnode_profile sed -i -e "/WIREGUARD_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wireguard }}"/" .dappnode_profile - sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.https }}"/" .dappnode_profile + sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/${{ github.event.inputs.https }}/" .dappnode_profile + sed -i -e "s|^export NOTIFICATIONS_VERSION=.*|export NOTIFICATIONS_VERSION=\"${{ github.event.inputs.notifications }}\"|" .dappnode_profile + sed -i -e "s|^export PREMIUM_VERSION=.*|export PREMIUM_VERSION=\"${{ github.event.inputs.premium }}\"|" .dappnode_profile cat .dappnode_profile - name: Create dappnode_profile.sh run: cp .dappnode_profile dappnode_profile.sh @@ -76,6 +87,8 @@ jobs: echo "wireguard=${{ github.event.inputs.wireguard }}" >> $GITHUB_OUTPUT echo "https=${{ github.event.inputs.https }}" >> $GITHUB_OUTPUT echo "vpn=${{ github.event.inputs.vpn }}" >> $GITHUB_OUTPUT + echo "notifications=${{ github.event.inputs.notifications }}" >> $GITHUB_OUTPUT + echo "premium=${{ github.event.inputs.premium }}" >> $GITHUB_OUTPUT build-debian-attended: name: Build Debian attended ISO diff --git a/scripts/dappnode_install.sh b/scripts/dappnode_install.sh index 2073838..ea9fc86 100755 --- a/scripts/dappnode_install.sh +++ b/scripts/dappnode_install.sh @@ -540,7 +540,7 @@ is_port_used() { determine_packages() { # Global override: minimal install, regardless of OS. if [[ "${MINIMAL}" == "true" ]]; then - PKGS=(BIND VPN WIREGUARD DAPPMANAGER) + PKGS=(BIND VPN WIREGUARD DAPPMANAGER NOTIFICATIONS PREMIUM) log "Minimal mode enabled; overriding packages" log "Packages to be installed: ${PKGS[*]}" log "PKGS: ${PKGS[*]}" @@ -561,23 +561,24 @@ determine_packages() { if is_always_on_mac; then if [ "$IS_PORT_USED" == "true" ]; then - PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI) + PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM) else - PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI HTTPS) + PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI HTTPS NOTIFICATIONS PREMIUM) fi else - PKGS=(BIND VPN WIREGUARD DAPPMANAGER) + PKGS=(BIND VPN WIREGUARD DAPPMANAGER NOTIFICATIONS PREMIUM) fi else # Linux / ISO logic is_iso_install is_port_used if [ "$IS_PORT_USED" == "true" ]; then - PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI) + PKGS=(BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM) else - PKGS=(HTTPS BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI) + PKGS=(HTTPS BIND IPFS VPN WIREGUARD DAPPMANAGER WIFI NOTIFICATIONS PREMIUM) fi fi + log "Packages to be installed: ${PKGS[*]}" # Debug: print all PKGS and their version variables