Skip to content

Commit 77bdf5a

Browse files
committed
fix wf issues
1 parent 056f53d commit 77bdf5a

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27,46 +27,37 @@ on:
2727
description: "Version of the OpenVPN Package. Only numbers"
2828
required: true
2929

30-
env:
31-
BIND_VERSION: ${{ github.event.inputs.bind }}
32-
IPFS_VERSION: ${{ github.event.inputs.ipfs }}
33-
DAPPMANAGER_VERSION: ${{ github.event.inputs.dappmanager }}
34-
WIFI_VERSION: ${{ github.event.inputs.wifi }}
35-
WIREGUARD_VERSION: ${{ github.event.inputs.wireguard }}
36-
HTTPS_VERSION: ${{ github.event.inputs.https }}
37-
VPN_VERSION: ${{ github.event.inputs.vpn }}
38-
CORE_VERSION: ${{ github.event.inputs.core }}
3930

4031
jobs:
4132
set-versions:
4233
name: Set versions and check regex
4334
runs-on: ubuntu-latest
4435
outputs:
45-
bind: ${{ env.BIND_VERSION }}
46-
ipfs: ${{ env.IPFS_VERSION }}
47-
dappmanager: ${{ env.DAPPMANAGER_VERSION }}
48-
wifi: ${{ env.WIFI_VERSION }}
49-
wireguard: ${{ env.WIREGUARD_VERSION }}
50-
https: ${{ env.HTTPS_VERSION }}
51-
vpn: ${{ env.VPN_VERSION }}
52-
core: ${{ env.CORE_VERSION }}
36+
bind: ${{ steps.set_outputs.outputs.bind }}
37+
ipfs: ${{ steps.set_outputs.outputs.ipfs }}
38+
dappmanager: ${{ steps.set_outputs.outputs.dappmanager }}
39+
wifi: ${{ steps.set_outputs.outputs.wifi }}
40+
wireguard: ${{ steps.set_outputs.outputs.wireguard }}
41+
https: ${{ steps.set_outputs.outputs.https }}
42+
vpn: ${{ steps.set_outputs.outputs.vpn }}
43+
core: ${{ steps.set_outputs.outputs.core }}
5344
steps:
5445
- name: Check versions regex
5546
run: |
56-
[[ $BIND_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $IPFS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $DAPPMANAGER_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \
57-
[[ $WIFI_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $WIREGUARD_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ $HTTPS_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] && \
58-
[[ $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; }
47+
[[ "${{ 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]+$ ]] && \
48+
[[ "${{ 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]+$ ]] && \
49+
[[ "${{ 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; }
5950
- name: Checkout
6051
uses: actions/checkout@v4
6152
- name: Set new versions
6253
run: |
63-
sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${BIND_VERSION}"/" .dappnode_profile
64-
sed -i -e "/IPFS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${IPFS_VERSION}"/" .dappnode_profile
65-
sed -i -e "/VPN_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${VPN_VERSION}"/" .dappnode_profile
66-
sed -i -e "/DAPPMANAGER_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${DAPPMANAGER_VERSION}"/" .dappnode_profile
67-
sed -i -e "/WIFI_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${WIFI_VERSION}"/" .dappnode_profile
68-
sed -i -e "/WIREGUARD_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${WIREGUARD_VERSION}"/" .dappnode_profile
69-
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${HTTPS_VERSION}"/" .dappnode_profile
54+
sed -i -e "/BIND_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.bind }}"/" .dappnode_profile
55+
sed -i -e "/IPFS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.ipfs }}"/" .dappnode_profile
56+
sed -i -e "/VPN_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.vpn }}"/" .dappnode_profile
57+
sed -i -e "/DAPPMANAGER_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.dappmanager }}"/" .dappnode_profile
58+
sed -i -e "/WIFI_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wifi }}"/" .dappnode_profile
59+
sed -i -e "/WIREGUARD_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.wireguard }}"/" .dappnode_profile
60+
sed -i -e "/HTTPS_VERSION/s/[0-9]*\.[0-9]*\.[0-9]*/"${{ github.event.inputs.https }}"/" .dappnode_profile
7061
cat .dappnode_profile
7162
- name: Create dappnode_profile.sh
7263
run: cp .dappnode_profile dappnode_profile.sh
@@ -75,6 +66,17 @@ jobs:
7566
with:
7667
name: dappnode_profile
7768
path: dappnode_profile.sh
69+
- name: Set outputs
70+
id: set_outputs
71+
run: |
72+
echo "core=${{ github.event.inputs.core }}" >> $GITHUB_OUTPUT
73+
echo "bind=${{ github.event.inputs.bind }}" >> $GITHUB_OUTPUT
74+
echo "ipfs=${{ github.event.inputs.ipfs }}" >> $GITHUB_OUTPUT
75+
echo "dappmanager=${{ github.event.inputs.dappmanager }}" >> $GITHUB_OUTPUT
76+
echo "wifi=${{ github.event.inputs.wifi }}" >> $GITHUB_OUTPUT
77+
echo "wireguard=${{ github.event.inputs.wireguard }}" >> $GITHUB_OUTPUT
78+
echo "https=${{ github.event.inputs.https }}" >> $GITHUB_OUTPUT
79+
echo "vpn=${{ github.event.inputs.vpn }}" >> $GITHUB_OUTPUT
7880
7981
build-debian-attended:
8082
name: Build Debian attended ISO
@@ -187,6 +189,11 @@ jobs:
187189
source: SHASUM_UBUNTU_UNATTENDED.txt,images/*-ubuntu-*-unattended.iso
188190
target: ${{ secrets.ISO_SSH_PATH }}
189191
overwrite: true
192+
- name: Upload Ubuntu unattended SHA256 as artifact
193+
uses: actions/upload-artifact@v4
194+
with:
195+
name: ubuntu-unattended-sha
196+
path: SHASUM_UBUNTU_UNATTENDED.txt
190197

191198
release:
192199
name: Combine, release, and upload
@@ -208,12 +215,14 @@ jobs:
208215
mv artifacts/debian-unattended-iso/* images/
209216
mv artifacts/debian-attended-sha/* .
210217
mv artifacts/debian-unattended-sha/* .
218+
mv artifacts/ubuntu-unattended-sha/* .
211219
mv artifacts/dappnode_profile/* .
212220
- name: Write release content
213221
run: |
214222
SHASUM_DEBIAN_ATTENDED=$(cat SHASUM_DEBIAN_ATTENDED.txt)
215223
SHASUM_DEBIAN_UNATTENDED=$(cat SHASUM_DEBIAN_UNATTENDED.txt)
216-
echo -en "# Versions\n| Package | Version |\n|---|---|\nbind.dnp.dappnode.eth|${{ needs.set-versions.outputs.bind }}|\n|ipfs.dnp.dappnode.eth|${{ needs.set-versions.outputs.ipfs }}|\n|vpn.dnp.dappnode.eth |${{ needs.set-versions.outputs.vpn }}|\n|dappmanager.dnp.dappnode.eth|${{ needs.set-versions.outputs.dappmanager }}|\n|wifi.dnp.dappnode.eth|${{ needs.set-versions.outputs.wifi }}|\n|https.dnp.dappnode.eth|${{ needs.set-versions.outputs.https }}|\n|wireguard.dnp.dappnode.eth|${{ needs.set-versions.outputs.wireguard }}|\n# Changes\nChanges implemented in release ${{ needs.set-versions.outputs.core }}\n# Debian Attended version\nInstall and customize DAppNode using the attended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64.iso**\n\n## ISO SHA-256 Checksum\n```\nshasum -a 256 DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64.iso\n$SHASUM_DEBIAN_ATTENDED\n```\n# Debian Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64-unattended.iso**\nDo a reboot right after the installation\n:warning: **Warning**: This ISO will install Dappnode automatically, deleting all existing partitions on the disk\n\n## ISO SHA-256 Checksum\n```\nshasum -a 256 DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64-unattended.iso\n$SHASUM_DEBIAN_UNATTENDED\n```\n# Ubuntu Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-ubuntu-bookworm-amd64-unattended.iso**\n\n## ISO SHA-256 Checksum\nUploaded directly to SSH server.\n# DAppNode for Raspberry Pi 4 64bit\n[Instructions](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide)\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnodepi" > CHANGELOG.md
224+
SHASUM_UBUNTU_UNATTENDED=$(cat SHASUM_UBUNTU_UNATTENDED.txt)
225+
echo -en "# Versions\n| Package | Version |\n|---|---|\nbind.dnp.dappnode.eth|${{ needs.set-versions.outputs.bind }}|\n|ipfs.dnp.dappnode.eth|${{ needs.set-versions.outputs.ipfs }}|\n|vpn.dnp.dappnode.eth |${{ needs.set-versions.outputs.vpn }}|\n|dappmanager.dnp.dappnode.eth|${{ needs.set-versions.outputs.dappmanager }}|\n|wifi.dnp.dappnode.eth|${{ needs.set-versions.outputs.wifi }}|\n|https.dnp.dappnode.eth|${{ needs.set-versions.outputs.https }}|\n|wireguard.dnp.dappnode.eth|${{ needs.set-versions.outputs.wireguard }}|\n# Changes\nChanges implemented in release ${{ needs.set-versions.outputs.core }}\n# Debian Attended version\nInstall and customize DAppNode using the attended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64.iso**\n\n## ISO SHA-256 Checksum\n```\nshasum -a 256 DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64.iso\n$SHASUM_DEBIAN_ATTENDED\n```\n# Debian Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64-unattended.iso**\nDo a reboot right after the installation\n:warning: **Warning**: This ISO will install Dappnode automatically, deleting all existing partitions on the disk\n\n## ISO SHA-256 Checksum\n```\nshasum -a 256 DAppNode-${{ needs.set-versions.outputs.core }}-debian-bookworm-amd64-unattended.iso\n$SHASUM_DEBIAN_UNATTENDED\n```\n# Ubuntu Unattended version\nInstall DAppNode easily using the unattended ISO: **DAppNode-${{ needs.set-versions.outputs.core }}-ubuntu-bookworm-amd64-unattended.iso**\n\n## ISO SHA-256 Checksum\n```\nshasum -a 256 DAppNode-${{ needs.set-versions.outputs.core }}-ubuntu-bookworm-amd64-unattended.iso\n$SHASUM_UBUNTU_UNATTENDED\n```\nUploaded at https://ubuntu.iso.dappnode.io\n# DAppNode for Raspberry Pi 4 64bit\n[Instructions](https://github.com/dappnode/DAppNode/wiki/DAppNodeARM-Installation-Guide)\n\ndefault login data:\n - **__user__**: dappnode\n - **__password__**: dappnodepi" > CHANGELOG.md
217226
cat CHANGELOG.md
218227
- name: Print images directory
219228
run: |
@@ -233,14 +242,4 @@ jobs:
233242
dappnode_profile.sh
234243
body_path: CHANGELOG.md
235244
env:
236-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237-
- name: Upload Ubuntu unattended to SSH server (and shasum)
238-
uses: appleboy/scp-action@v0.1.7
239-
with:
240-
host: ${{ secrets.ISO_SSH_HOST }}
241-
username: ${{ secrets.ISO_SSH_USER }}
242-
key: ${{ secrets.ISO_SSH_PRIVATE_KEY }}
243-
port: ${{ secrets.SSH_PORT }}
244-
source: SHASUM_UBUNTU_UNATTENDED.txt,./images/Dappnode-*-ubuntu-*-unattended.iso
245-
target: ${{ secrets.ISO_SSH_PATH }}
246-
overwrite: true
245+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)