Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build

on:
workflow_call:
inputs:
version_type:
required: true
type: string
description: "The type of version bump (commit, pr, release)"

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Install dependencies
run: |
npm install
- name: Build
if: inputs.version_type == 'commit'
run: |
npx @dappnode/dappnodesdk build \
--provider "remote" \
--verbose | tee build.log
- name: Build and publish
if: inputs.version_type == 'pr' || inputs.version_type == 'release'
run: |
npx @dappnode/dappnodesdk publish patch \
--provider "remote" \
--upload_to "ipfs" \
--verbose \
--github_release | tee build.log
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEVELOPER_ADDRESS: "0x7305356ad936A06c4ea5DF45AD5E5C3ff9Db818E"
- name: Summarize build output
id: summarize
run: |
grep "ipfs" build.log >> $GITHUB_STEP_SUMMARY
ipfs_hash=$(grep -oP 'Release hash : \K/ipfs/\w+' build.log)
- name: Send message to Zulip
if: inputs.version_type == 'release'
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: ${{ secrets.ZULIP_EMAIL }}
organization-url: "https://hopr.zulipchat.com"
type: "stream"
to: "HOPRd"
topic: "Releases"
content: |
A new hoprd dAppNode package (rotsee) version is available.
- IPFS Hash: ${{ steps.summarize.outputs.ipfs_hash }}
Access to your dAppNode and check for the updates
echo "ipfs_hash=$ipfs_hash" | tee -a $GITHUB_OUTPUT
62 changes: 62 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bump packages

on:
repository_dispatch:
types: [release]
workflow_dispatch:
inputs:
hoprd_version:
description: 'Version of hoprd to build'
required: false
node_admin_version:
description: 'Version of node-admin to build'
required: false


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Setup variables
id: setup
run: |
default_hoprd_version=$(yq -r '.services.hoprd.build.args.UPSTREAM_VERSION' docker-compose.yml)
node_admin_image=$(yq -r '.services.admin.image' docker-compose.yml)
default_node_admin_version=$(echo $node_admin_image | cut -d: -f2)
echo "HOPRD_VERSION=${HOPRD_VERSION:-$default_hoprd_version}" | tee -a "${GITHUB_OUTPUT}"
echo "NODE_ADMIN_VERSION=${NODE_ADMIN_VERSION:-$default_node_admin_version}" | tee -a "${GITHUB_OUTPUT}"
env:
HOPRD_VERSION: ${{ github.event.inputs.hoprd_version || github.event.client_payload.hoprd_version }}
NODE_ADMIN_VERSION: ${{ github.event.inputs.node_admin_version || github.event.client_payload.node_admin_version }}
- name: Update docker-compose.yml
run: |
yq -i '.services.hoprd.build.args.UPSTREAM_VERSION = strenv(HOPRD_VERSION)' docker-compose.yml
yq -i '.services.admin.image = "europe-west3-docker.pkg.dev/hoprassociation/docker-images/hopr-admin:" + strenv(NODE_ADMIN_VERSION)' docker-compose.yml
env:
HOPRD_VERSION: ${{ steps.setup.outputs.HOPRD_VERSION }}
NODE_ADMIN_VERSION: ${{ steps.setup.outputs.NODE_ADMIN_VERSION }}
- name: Install dependencies
run: |
npm install
- name: Build
run: |
npx @dappnode/dappnodesdk build \
--provider "remote" \
--verbose | tee build.log
- name: Commit bumped versions
uses: EndBug/add-and-commit@290ea2c423ad77ca9c62ae0f5b224379612c0321 # v10.0.0
with:
add: docker-compose.yml
new_branch: ${{ github.ref_name }}
message: "ci: Bump docker images"
pathspec_error_handling: ignore
default_author: user_info
github_token: ${{ secrets.github_token }}
32 changes: 0 additions & 32 deletions .github/workflows/main.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Merge
on:
pull_request:
types:
- closed
jobs:
build:
name: Build
if: github.event.pull_request.merged == true
uses: ./.github/workflows/build.yml
with:
version_type: pr
14 changes: 14 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
with:
version_type: commit
53 changes: 6 additions & 47 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,12 @@
name: Build (release package)

on:
push:
branches:
- main

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Set up Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose

- name: Build and publish to package repository
id: publish
run: |
npm install
npx @dappnode/dappnodesdk publish patch \
--provider "remote" \
--upload_to "ipfs" \
--verbose \
--github_release | tee build.log

echo "DNP (DAppNode Package) built and uploaded" >> $GITHUB_STEP_SUMMARY
grep "ipfs" build.log >> $GITHUB_STEP_SUMMARY
ipfs_hash=$(grep -oP 'Release hash : \K/ipfs/\w+' build.log)
echo "ipfs_hash=$ipfs_hash" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEVELOPER_ADDRESS: "0x7305356ad936A06c4ea5DF45AD5E5C3ff9Db818E"

- name: Send message to Zulip
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: ${{ secrets.ZULIP_EMAIL }}
organization-url: "https://hopr.zulipchat.com"
type: "stream"
to: "HOPRd"
topic: "Releases"
content: |
A new hoprd dAppNode package (rotsee) version is available.
- IPFS Hash: ${{ steps.publish.outputs.ipfs_hash }}
Access to your dAppNode and check for the updates
name: Build
uses: ./.github/workflows/build.yml
with:
version_type: release
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
args:
UPSTREAM_VERSION: 3.0.0@sha256:fa9764f5e9927094960f63dfb68dbf6cbc237210559a890f1effa29da6e92ecd
UPSTREAM_VERSION: 4.0.0-rc.3@sha256:81a866d276c37ec7db2a66d31b4fb30dee26143a4cf5a0a9c59078d8c99b42d8
ports:
- "3101:3101/tcp"
- 9191:9191/tcp
Expand Down
20 changes: 6 additions & 14 deletions setup-wizard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,17 @@ fields:
*or* if you plan to expose your REST API (port 3101) or HOPR Admin UI (port 3100) to the public.
secret: true

- id: HOPRD_PROVIDER
- id: HOPRD_BLOKLI_URL
target:
type: environment
name: HOPRD_PROVIDER
name: HOPRD_BLOKLI_URL
service: node
title: RPC Provider URL
title: Blokli URL
required: false
description: |-
URL to the custom RPC provider this HOPR node should use. Supports simple query strings.
If your DAppnode is running a Gnosis Chain RPC endpoint, it is **strongly recommended** to use it here.
URL to the Blokli provider this HOPR node should use.

*Example:* `http://nethermind-xdai.dappnode:8545`
*Example:* `https://blokli.rotsee.hoprnet.link`
secret: false
# Regular expression for matching URLs with simple query strings
#
Expand All @@ -53,14 +52,7 @@ fields:
# - (:[0-9]{2,5})? : Optional port number (10-99999)
# Examples: :80, :8080, :44300
#
# - (/[a-z0-9.-/_]*)? : Optional URL path
# Allows: slashes, lowercase letters, numbers, dots, hyphens, underscores
# Examples: /path, /path/to/resource, /api/v1/endpoint
#
# - (\?[a-z0-9._=&-]*)? : Optional query string
# Allows: lowercase letters, numbers, dots, underscores, equals signs, ampersands, hyphens
# Examples: ?param=value, ?id=123&type=test, ?user.name=john_doe
pattern: ^http[s]{0,1}:\/\/[a-z0-9.-]{3,}(:[0-9]{2,5})?(\/[a-z0-9.-/_]*)?(\?[a-z0-9._=&-]*)?$
pattern: ^http[s]{0,1}:\/\/[a-z0-9.-]{3,}(:[0-9]{2,5})?$
patternErrorMessage: Must be a valid url starting with `http://` or `https://`

# - id: IDENTITY
Expand Down