Pre-release #156
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pre-release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| core: | ||
| description: "Version of the Core. Must be prefixed with v (e.g v0.2.47)" | ||
| required: true | ||
| dappmanager: | ||
| description: "Version of the Dappmanager. Only numbers" | ||
| required: true | ||
| wifi: | ||
| description: "Version of the WiFi Package. Only numbers" | ||
| required: true | ||
| bind: | ||
| description: "Version of the Bind Package. Only numbers" | ||
| required: true | ||
| ipfs: | ||
| description: "Version of the IPFS Package. Only numbers" | ||
| required: true | ||
| https: | ||
| description: "Version of the HTTPS Package. Only numbers" | ||
| required: true | ||
| wireguard: | ||
| description: "Version of the Wireguard Package. Only numbers" | ||
| required: true | ||
| vpn: | ||
| description: "Version of the OpenVPN Package. Only numbers" | ||
| required: true | ||
| env: | ||
| BIND_VERSION: ${{ github.event.inputs.bind }} | ||
| IPFS_VERSION: ${{ github.event.inputs.ipfs }} | ||
| DAPPMANAGER_VERSION: ${{ github.event.inputs.dappmanager }} | ||
| WIFI_VERSION: ${{ github.event.inputs.wifi }} | ||
| WIREGUARD_VERSION: ${{ github.event.inputs.wireguard }} | ||
| HTTPS_VERSION: ${{ github.event.inputs.https }} | ||
| VPN_VERSION: ${{ github.event.inputs.vpn }} | ||
| CORE_VERSION: ${{ github.event.inputs.core }} | ||
| jobs: | ||
| pre-release: | ||
| name: Create pre-release artifacts | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - name: Check versions regex | ||
| run: | | ||
| [[ $BIND_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $IPFS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $DAPPMANAGER_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ | ||
| [[ $WIFI_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $WIREGUARD_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $HTTPS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \ | ||
| [[ $VPN_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $CORE_VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "versions introduced in wrong format"; exit 1; } | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Set new versions | ||
| run: | | ||
| sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${BIND_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/IPFS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${IPFS_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/VPN_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${VPN_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/DAPPMANAGER_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${DAPPMANAGER_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/WIFI_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${WIFI_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/WIREGUARD_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${WIREGUARD_VERSION}"/" .dappnode_profile | ||
| sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile | ||
| cat .dappnode_profile | ||
| - name: Build Debian attended | ||
| run: | | ||
| sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
| sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
| docker compose build | ||
| docker compose up | ||
| - name: Check Debian ISO attended | ||
| run: | | ||
| ls -lrt images/Dappnode-debian-*.iso | ||
| - name: Set Debian Dappnode attended ISO name | ||
| run: | | ||
| file=$(ls images/Dappnode-debian-*.iso) | ||
| attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
| mv "$file" "$attended_filename" | ||
| - name: Build Debian unattended | ||
| run: | | ||
| sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
| docker compose build | ||
| docker compose up | ||
| - name: Check Debian ISO unattended | ||
| run: | | ||
| ls -lrt images/Dappnode-debian-*.iso | ||
| - name: Set Dappnode unattended ISO name | ||
| run: | | ||
| file=$(ls images/Dappnode-debian-*.iso) | ||
| core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
| unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
| mv "$file" "$unattended_filename" | ||
| - name: Build Ubuntu attended | ||
| run: | | ||
| sed -i -e "/BASE_OS/s/debian/ubuntu/" docker-compose.yml | ||
| sed -i -e "/UNATTENDED/s/true/false/" docker-compose.yml | ||
| docker-compose up --build | ||
| - name: Check Ubuntu ISO attended | ||
| run: | | ||
| ls -lrt images/Dappnode-ubuntu-*.iso | ||
| - name: Set Ubuntu Dappnode attended ISO name | ||
| run: | | ||
| file=$(ls images/Dappnode-ubuntu-*.iso) | ||
| attended_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
| mv "$file" "$attended_filename" | ||
| - name: Build Ubuntu unattended | ||
| run: | | ||
| sed -i -e "/BASE_OS/s/ubuntu/debian/" docker-compose.yml | ||
| sed -i -e "/UNATTENDED/s/false/true/" docker-compose.yml | ||
| docker-compose up --build | ||
| - name: Check Ubuntu ISO unattended | ||
| run: | | ||
| ls -lrt images/Dappnode-ubuntu-*.iso | ||
| - name: Set Ubuntu Dappnode unattended ISO name | ||
| run: | | ||
| file=$(ls images/Dappnode-ubuntu-*.iso) | ||
| core_filename="${file/images\/Dappnode-/Dappnode-${CORE_VERSION}-}" | ||
| unattended_filename="${core_filename/%.iso/-unattended.iso}" | ||
| mv "$file" "$unattended_filename" | ||
| - name: Create dappnode_profile.sh | ||
| run: | | ||
| cp .dappnode_profile dappnode_profile.sh | ||
| # SHASUMs | ||
| - name: Get SHA-256 Debian attended | ||
| id: shasum-debian-attended | ||
| run: | | ||
| file=$(find . -type f -name 'Dappnode-debian-*.iso' ! -name '*unattended*') | ||
| SHASUM_DEBIAN_ATTENDED=$(shasum -a 256 $file) | ||
| echo "::set-output name=SHASUM_DEBIAN_ATTENDED::$SHASUM_DEBIAN_ATTENDED" | ||
| - name: Get SHA-256 Debian unattended | ||
| id: shasum-debian-unattended | ||
| run: | | ||
| file=$(find . -type f -name 'Dappnode-debian-*unattended.iso') | ||
| SHASUM_DEBIAN_UNATTENDED=$(shasum -a 256 $file) | ||
| echo "::set-output name=SHASUM_DEBIAN_UNATTENDED::$SHASUM_DEBIAN_UNATTENDED" | ||
| - name: Get SHA-256 Debian attended | ||
| id: shasum-ubuntu-attended | ||
| run: | | ||
| file=$(find . -type f -name 'Dappnode-ubuntu-*.iso' ! -name '*unattended*') | ||
| SHASUM_UBUNTU_ATTENDED=$(shasum -a 256 $file)s | ||
| echo "::set-output name=SHASUM_UBUNTU_ATTENDED::$SHASUM_UBUNTU_ATTENDED" | ||
| - name: Get SHA-256 Debian unattended | ||
| id: shasum-ubuntu-unattended | ||
| run: | | ||
| file=$(find . -type f -name 'Dappnode-ubuntu-*unattended.iso') | ||
| SHASUM_UBUNTU_UNATTENDED=$(shasum -a 256 $file) | ||
| echo "::set-output name=SHASUM_UBUNTU_UNATTENDED::$SHASUM_UBUNTU_UNATTENDED" | ||
| # ARTIFACTS ASSETS | ||
| - name: Artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: test-artifact | ||
| path: | | ||
| ./Dappnode-debian-*.iso | ||
| ./Dappnode-ubuntu-*.iso | ||
| ./scripts/dappnode_install.sh | ||
| ./scripts/dappnode_install_pre.sh | ||
| ./scripts/dappnode_uninstall.sh | ||
| ./scripts/dappnode_access_credentials.sh | ||
| dappnode_profile.sh | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Check git diff | ||
| id: git_diff | ||
| run: | | ||
| git diff --no-index --word-diff-regex=[^[:space:]] --no-patch .dappnode_profile && echo '::set-output name=HAS_CHANGED::true' || echo '::set-output name=HAS_CHANGED::false' | ||
| # … your existing "Artifact" upload-artifact@v3 step here … | ||
| # Generate CHANGELOG.md just like before, | ||
| - name: Write release content | ||
| run: | | ||
| cat > CHANGELOG.md <<EOF | ||
| # Versions | ||
| | Package | Version | | ||
| |---------------------------------|-----------------------| | ||
| | bind.dnp.dappnode.eth | ${BIND_VERSION} | | ||
| | ipfs.dnp.dappnode.eth | ${IPFS_VERSION} | | ||
| | vpn.dnp.dappnode.eth | ${VPN_VERSION} | | ||
| | dappmanager.dnp.dappnode.eth | ${DAPPMANAGER_VERSION}| | ||
| | wifi.dnp.dappnode.eth | ${WIFI_VERSION} | | ||
| | https.dnp.dappnode.eth | ${HTTPS_VERSION} | | ||
| | wireguard.dnp.dappnode.eth | ${WIREGUARD_VERSION} | | ||
| # Changes | ||
| Changes implemented in release ${CORE_VERSION} | ||
| # Debian Attended | ||
| Install and customize Dappnode using the Debian attended ISO: **Dappnode-${CORE_VERSION}-debian-bookworm-amd64.iso** | ||
| ## ISO SHA-256 Checksum | ||
| \`\`\` | ||
| ${{ steps.shasum-debian-attended.outputs.SHASUM_DEBIAN_ATTENDED }} | ||
| \`\`\` | ||
| # Debian Unattended | ||
| Install Debian unattended ISO: **Dappnode-${CORE_VERSION}-debian-bookworm-amd64-unattended.iso** | ||
| Reboot right after installation. | ||
| :warning: **Warning**: This will install Dappnode automatically, wiping all partitions. | ||
| ## ISO SHA-256 Checksum | ||
| \`\`\` | ||
| ${{ steps.shasum-debian-unattended.outputs.SHASUM_DEBIAN_UNATTENDED }} | ||
| \`\`\` | ||
| # Ubuntu Attended | ||
| Install using the Ubuntu attended ISO: **Dappnode-${CORE_VERSION}-ubuntu-bookworm-amd64.iso** | ||
| ## ISO SHA-256 Checksum | ||
| \`\`\` | ||
| ${{ steps.shasum-ubuntu-attended.outputs.SHASUM_UBUNTU_ATTENDED }} | ||
| \`\`\` | ||
| # Ubuntu Unattended | ||
| Install using the Ubuntu unattended ISO: **Dappnode-${CORE_VERSION}-ubuntu-bookworm-amd64-unattended.iso** | ||
| ## ISO SHA-256 Checksum | ||
| \`\`\` | ||
| ${{ steps.shasum-ubuntu-unattended.outputs.SHASUM_UBUNTU_UNATTENDED }} | ||
| \`\`\` | ||
| # Dappnode for Raspberry Pi 4 (64-bit) | ||
| [Installation guide →](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide) | ||
| **Default login:** | ||
| - __user__: dappnode | ||
| - __password__: dappnodepi | ||
| EOF | ||
| cat CHANGELOG.md | ||
| - name: Create pre-release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.event.inputs.core }} | ||
| prerelease: true | ||
| files: | | ||
| ./Dappnode-${CORE_VERSION}-debian-*.iso | ||
| ./Dappnode-${CORE_VERSION}-debian-*-unattended.iso | ||
| ./Dappnode-${CORE_VERSION}-ubuntu-*.iso | ||
| ./Dappnode-${CORE_VERSION}-ubuntu-*-unattended.iso | ||
| ./scripts/dappnode_install*.sh | ||
| dappnode_profile.sh | ||
| body_path: CHANGELOG.md | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Create Pull Request | ||
| if: steps.git_diff.outputs.HAS_CHANGED == 'true' | ||
| uses: peter-evans/create-pull-request@v5 | ||
| with: | ||
| add-paths: ".dappnode_profile" | ||
| commit-message: "update core packages versions" | ||
| branch: "update-profile" | ||
| title: "update core packages versions" | ||
| delete-branch: true | ||