-
Notifications
You must be signed in to change notification settings - Fork 98
feat(ci): Create OS packages #7251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Warning Rate limit exceeded@ausias-armesto has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 13 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 Walkthrough## Walkthrough
This update introduces a comprehensive packaging and release automation system for the project. It adds new GitHub Actions workflows for packaging binaries and creating releases, along with scripts and configuration files for building Linux packages (deb, rpm, apk), service management, and post-installation setup. Several existing CI jobs are disabled or replaced, and supporting scripts and shell environments are updated accordingly.
## Changes
| File(s) | Change Summary |
|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| .github/workflows/build.yaml | Added a new matrix-based `package` job invoking `.github/workflows/package.yaml` for multiple Linux targets; no other jobs removed or modified. |
| .github/workflows/package.yaml | Added: New workflow for packaging binaries for specified targets, including artifact download, Nix and Cachix setup, packaging with `just`, and uploading Debian, RPM, and Alpine package artifacts. |
| .github/workflows/create-release.yaml | Added: New workflow for automated GitHub release creation with concurrency control, version detection, changelog generation, Docker image tagging and pushing, release creation and asset upload, milestone closing, and Zulip notification. |
| .github/workflows/merge.yaml | Refactored `create_release` job to use reusable workflow `.github/workflows/create-release.yaml` with inherited secrets; removed detailed inline steps and explicit runner specification. Enabled `bencher` job with condition and reusable workflow call. |
| .github/workflows/build-binaries.yaml | Modified artifact upload step to restrict uploaded files to a specific binary instead of all files in the `bin` directory. |
| .github/workflows/build-dappnode.yaml | Changed event triggers and conditionals from `pull_request` to `pull_request_target` to align workflow triggering and environment setup. |
| deploy/nfpm/nfpm.yaml<br>deploy/nfpm/hoprd.service<br>deploy/nfpm/hoprd.initd<br>deploy/nfpm/hoprd-sample.cfg.yaml | Added: nfpm package configuration for "hoprd" with metadata, dependencies, contents, and lifecycle scripts; systemd and OpenRC service unit files for hoprd; sample configuration defining service parameters and strategies. |
| deploy/nfpm/package-post-install.sh<br>deploy/nfpm/package-pre-uninstall.sh | Added: Post-installation script for environment setup, user/group creation, service enablement, startup verification, and node identity generation; pre-uninstall script for stopping service, removing user/group, and cleaning configuration and data directories. |
| justfile | Added: `package-packager` and `package` recipes to build deb, rpm, and apk packages using nfpm with environment variable substitution. |
| scripts/download-workflow-binaries.sh | Changed: Downloaded artifacts are extracted into structured directories (`dist/zip`, `dist/bin`, `dist/packages`), platform-specific binaries are zipped, and artifacts are organized by platform. |
| scripts/get-current-version.sh | Improved: Default parameter value added for version type; simplified version extraction using `grep` and `awk`. |
| nix/ciShell.nix<br>flake.nix | Added: `nfpm` and `envsubst` packages included in development shell environments via `extraPackages`. |
| .gitignore | Added: Ignore pattern for generated nfpm config file `deploy/nfpm/nfpm.generated.yaml`. |
| deploy/nfpm/logrotate.conf | Added: Logrotate configuration for hoprd service logs with daily rotation, compression, retention, and permissions setup. |
| README.md | Added: Installation instructions for hoprd via Debian, Red Hat, and Alpine package managers, including architecture detection, download, install, and uninstall commands. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant Developer
participant GitHub Actions
participant Nix/Cachix
participant Artifact Storage
participant Systemd/OpenRC
Developer->>GitHub Actions: Push PR / Merge to main
GitHub Actions->>GitHub Actions: build-binaries job
GitHub Actions->>Artifact Storage: Upload built binaries
GitHub Actions->>GitHub Actions: package job (matrix: 3 targets)
GitHub Actions->>Artifact Storage: Download binaries
GitHub Actions->>Nix/Cachix: Setup Nix and authenticate Cachix
GitHub Actions->>GitHub Actions: Run packaging scripts (deb, rpm, apk)
GitHub Actions->>Artifact Storage: Upload package artifacts
GitHub Actions->>GitHub Actions: create-release workflow
GitHub Actions->>Artifact Storage: Download assets
GitHub Actions->>GitHub Actions: Generate changelog and create release
GitHub Actions->>Artifact Storage: Upload release assets
GitHub Actions->>Systemd/OpenRC: (On install) Run post-install script, enable/start service Possibly related PRs
Suggested labels
Suggested reviewers
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the packaging workflows and scripts to produce OS packages (DEB, RPM, APK) for the hoprd
binaries.
- Refactors version extraction in
get-current-version.sh
and adds a default type. - Adds
nfpm
to the Nix dev shell andjust
tasks for packaging. - Introduces NFPM config, install/uninstall scripts, systemd unit, and CI packaging workflows.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
scripts/get-current-version.sh | Use awk for version parsing and default version_type fallback |
nix/ciShell.nix | Added nfpm to development environment |
justfile | New package and package-all recipes to build OS packages |
deploy/nfpm/uninstall.sh | Uninstall hook to stop and disable the systemd service |
deploy/nfpm/nfpm.yaml | Core NFPM package definition for hoprd |
deploy/nfpm/install.sh | Install hook generating config, creating identity, and starting svc |
deploy/nfpm/hoprd.service | Systemd unit file for the hoprd service |
deploy/nfpm/hoprd-template.cfg.yaml | Template YAML config with placeholders for environment variables |
.github/workflows/package.yaml | New reusable workflow for packaging artifacts |
.github/workflows/build.yaml | Updated build job naming and added package job |
Comments suppressed due to low confidence (1)
.github/workflows/build.yaml:68
- This step is missing a leading
-
to denote a new entry in thesteps
list, which will cause invalid YAML.
name: build-${{ matrix.binary }}-${{ matrix.target.name }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
♻️ Duplicate comments (4)
scripts/get-current-version.sh (1)
25-25
: Use robust default fallback forversion_type
version_type=${1-semver}
only defaults when$1
is unset, not empty. Prefer${1:-semver}
to cover both cases.Apply this diff:
-version_type=${1-semver} +version_type=${1:-semver}deploy/nfpm/hoprd.service (1)
8-8
: Run service under a non-root user
Runninghoprd
asroot
increases risk. Create a dedicatedhoprd
user and update the unit:-User=root +User=hoprd +Group=hoprdAlso ensure the
hoprd
user exists and owns relevant directories.justfile (1)
30-33
: Backup restoration path is still wrong
sed
creates the backup asdeploy/nfpm/nfpm.yaml.bak
, but themv
command tries to restore fromnfpm/nfpm.yaml.bak
, which doesn’t exist. The same issue was raised previously.- mv nfpm/nfpm.yaml.bak nfpm/nfpm.yaml + mv deploy/nfpm/nfpm.yaml.bak deploy/nfpm/nfpm.yamldeploy/nfpm/install.sh (1)
18-23
: Public-IP lookup over plain HTTPFetching the node’s IP via
http://checkip.amazonaws.com
is vulnerable to MITM.
Switch to HTTPS:- public_ip=$(curl -s http://checkip.amazonaws.com) + public_ip=$(curl -s https://checkip.amazonaws.com)
🧹 Nitpick comments (4)
scripts/get-current-version.sh (1)
26-26
: Quote path ingrep
invocation
Wrap the file path in quotes to avoid word-splitting or globbing issues.-current_version=$(grep -E '^version\s*=' ${mydir}/../hopr/hopr-lib/Cargo.toml | awk -F\" '{print $2}') +current_version=$(grep -E '^version\s*=' "${mydir}/../hopr/hopr-lib/Cargo.toml" | awk -F\" '{print $2}')deploy/nfpm/uninstall.sh (1)
3-6
: Make uninstall script idempotent
Failingsystemctl
commands (e.g., if the service is already stopped) will abort package removal. Append|| true
to ensure uninstall proceeds.-systemctl disable hoprd.service -systemctl stop hoprd.service -systemctl daemon-reexec -systemctl daemon-reload +systemctl disable hoprd.service || true +systemctl stop hoprd.service || true +systemctl daemon-reexec || true +systemctl daemon-reload || truejustfile (1)
31-32
: Potential over-match insed
for the arch fieldBlindly replacing the first
arch:
occurrence may mangle other YAML blocks if they are added later (e.g., a files list containing the wordarch
).
Use an anchored match to the beginning of the line to make the edit safer:- sed -i.bak "s/arch:.*/arch: \"{{arch}}\"/" deploy/nfpm/nfpm.yaml + sed -i.bak "s/^arch:.*/arch: \"{{arch}}\"/" deploy/nfpm/nfpm.yamldeploy/nfpm/install.sh (1)
108-113
: **/etc/hoprd
may not exist –envsubst
will fail**Add a guard before writing the config:
mkdir -p /etc/hoprd envsubst < "$HOPRD_TEMPLATE_CONFIG_FILE" > "$HOPRD_CONFIG_FILE"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.github/workflows/build.yaml
(2 hunks).github/workflows/package.yaml
(1 hunks)deploy/nfpm/hoprd-template.cfg.yaml
(1 hunks)deploy/nfpm/hoprd.service
(1 hunks)deploy/nfpm/install.sh
(1 hunks)deploy/nfpm/nfpm.yaml
(1 hunks)deploy/nfpm/uninstall.sh
(1 hunks)justfile
(1 hunks)nix/ciShell.nix
(1 hunks)scripts/get-current-version.sh
(1 hunks)
🧰 Additional context used
🪛 Shellcheck (0.10.0)
deploy/nfpm/install.sh
[warning] 31-31: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 32-32: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 36-36: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 39-39: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 62-62: HOPRD_HOST_ADDRESS appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 63-63: HOPRD_HOST_PORT appears unused. Verify use (or export if used externally).
(SC2034)
[warning] 76-76: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 87-87: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 99-99: In POSIX sh, read -p is undefined.
(SC3045)
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
22-22: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
31-31: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
37-37: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
56-56: shellcheck reported issue in this script: SC1083:warning:1:18: This { is literal. Check expression (missing ;/\n?) or quote it
(shellcheck)
56-56: shellcheck reported issue in this script: SC1083:warning:1:19: This { is literal. Check expression (missing ;/\n?) or quote it
(shellcheck)
56-56: shellcheck reported issue in this script: SC1083:warning:1:35: This } is literal. Check expression (missing ;/\n?) or quote it
(shellcheck)
56-56: shellcheck reported issue in this script: SC1083:warning:1:36: This } is literal. Check expression (missing ;/\n?) or quote it
(shellcheck)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: hopli / docker
- GitHub Check: hoprd / docker
- GitHub Check: Build Candidate Binaries (hopli)
- GitHub Check: zizmor
- GitHub Check: tests-unit-nightly
- GitHub Check: Build Candidate Binaries (hoprd)
- GitHub Check: Linter
- GitHub Check: Cargo Audit
🔇 Additional comments (3)
nix/ciShell.nix (1)
18-18
: Add nfpm to development shell
Includingnfpm
in thepackages
array ensures developers can locally build and test OS packages.deploy/nfpm/hoprd-template.cfg.yaml (1)
1-40
: No issues found in the configuration template; it aligns with the intended templating and environment substitution workflow.deploy/nfpm/install.sh (1)
66-69
: Missing runtime dependencies (openssl
,netcat
)The script invokes
openssl rand
andnc
. They are not listed independs:
ofnfpm.yaml
, so the package may work on the maintainer’s system but fail on vanilla servers.
Add at leastopenssl
andnetcat-openbsd
(or BusyBox) to the dependency list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/package.yaml (1)
62-62
: Wrong interpolation – braces need the$
prefix
{{ matrix.target }}
is passed literally to the shell, breaking the command.- just package-all {{ matrix.target }} + just package-all "${{ matrix.target }}"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/build-binaries.yaml
(1 hunks).github/workflows/build.yaml
(2 hunks).github/workflows/package.yaml
(1 hunks)deploy/nfpm/nfpm.yaml
(1 hunks)flake.nix
(1 hunks)justfile
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/build-binaries.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
- deploy/nfpm/nfpm.yaml
- justfile
- .github/workflows/build.yaml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
22-22: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: package-aarch64-linux / Package binaries (aarch64-linux)
- GitHub Check: build-hopli-x86_64-linux / binary
- GitHub Check: hoprd / docker
- GitHub Check: build-hoprd-x86_64-linux / binary
- GitHub Check: hopli / docker
- GitHub Check: zizmor
- GitHub Check: Cargo Audit
🔇 Additional comments (2)
flake.nix (1)
659-661
:nfpm
addition looks correct but remember CI parityIncluding
nfpm
in the interactive dev shell is great, yet the CI (ciShell
) and GitHub Actions packaging job rely on the same binary.
Double-check thatnfpm
is available to those environments (currently only the dev shell is amended). If not, replicate this extraPackages stanza inciShell.nix
or invokenix develop
inside the workflow before runningjust package-all
..github/workflows/package.yaml (1)
15-29
: Input vs. matrix mismatch may cause concurrency collisions
concurrency.group
keys offinputs.target
, but the job itself builds a fixed matrix of three targets, ignoring the input.
If callers supply a singletarget
, you’ll get three jobs whose concurrency group is identical, leading to cancelled runs or serialisation surprises.Either:
- drop the
target
input entirely and rely solely on the matrix, or- populate the matrix from
${{ inputs.target }}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (3)
.github/workflows/package.yaml (3)
30-40
: Re-enable artifact download steps to use real binaries.Commented-out
actions/download-artifact
steps mean you’re packaging dummy files. Restore those steps and remove temporary echo commands once real artifacts are present.
57-60
: Remove dummy binary creation – use downloaded artifacts instead.Creating placeholders undermines packaging validity. Delete these
echo
lines after re-enabling artifact retrieval.
61-61
: Fix variable interpolation in the shell command.Bash needs the GitHub expression syntax
${{ matrix.target }}
inside quotes, not{{ matrix.target }}
.Apply:
- nix develop -c just package-all {{ matrix.target }} + nix develop -c just package-all "${{ matrix.target }}"
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/package.yaml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
22-22: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: build-hoprd-x86_64-linux / binary
- GitHub Check: build-hopli-x86_64-linux / binary
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: zizmor
🔇 Additional comments (1)
.github/workflows/package.yaml (1)
22-22
: Verify that the self-hosted runner label is valid.The label
self-hosted-hoprnet-small
is not a default GitHub runner label. Confirm that this custom runner is registered and available, or switch to a known label.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (5)
deploy/nfpm/install.sh (4)
12-15
: Still fetching public IP over plain HTTP
This was flagged earlier;http://checkip.amazonaws.com
is vulnerable to MITM.
Switch to a HTTPS endpoint (same host supports it).
25-34
:local
is not defined in POSIX sh
Persisting issue from the previous review – keeps the script from running on/bin/sh
.
65-86
: Interactiveread -p
prompts break non-interactive installsPost-install scripts run under package managers that set
DEBIAN_FRONTEND=noninteractive
.
Replace prompts with:
- Pre-declare sensible defaults.
- Fail fast if required env-vars are absent.
1-1
: Use Bash in shebang or drop Bash-only syntaxThe script relies on
local
,read -p
,$(( ))
, and[[ … ]]
-style regexes, none of which are POSIX/bin/sh
on Debian/Alpine (dash, busybox).
Either change the shebang:-#!/bin/sh +#!/usr/bin/env bashor purge every Bash-ism.
Failing to do so aborts the post-install script and breaks package installation.justfile (1)
34-40
: Nestedjust
calls still use literal bracesEarlier review pointed this out;
${{arch}}
is expanded only once, so the inner recipe receives the literal string{{arch}}
and always builds for the default arch.Use positional parameters instead:
-just package-packager deb {{arch}} -just package-packager rpm {{arch}} -just package-packager apk {{arch}} +just package-packager deb {{arch}} +just package-packager rpm {{arch}} +just package-packager apk {{arch}}or rely on just’s template expansion within the called recipe (
just package-packager deb {{arch}}
). Verify behaviour – current form is fragile.
🧹 Nitpick comments (1)
deploy/nfpm/install.sh (1)
133-135
: Missing trailing newline results in concatenated linesUnlike the other vars,
add_rpc_provider_var
does not append “\n
” after the provider line, producing:HOPRD_PROVIDER=…HOPRD_API_HOST=…
Add the newline to keep the env file valid.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
.github/workflows/build.yaml
(2 hunks).github/workflows/package.yaml
(1 hunks).gitignore
(1 hunks)deploy/nfpm/hoprd-sample.cfg.yaml
(1 hunks)deploy/nfpm/hoprd.initd
(1 hunks)deploy/nfpm/hoprd.service
(1 hunks)deploy/nfpm/install.sh
(1 hunks)deploy/nfpm/nfpm.yaml
(1 hunks)justfile
(1 hunks)scripts/download-workflow-binaries.sh
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- .gitignore
- deploy/nfpm/hoprd.initd
- deploy/nfpm/hoprd-sample.cfg.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
- deploy/nfpm/nfpm.yaml
- deploy/nfpm/hoprd.service
- .github/workflows/build.yaml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
24-24: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
🪛 Shellcheck (0.10.0)
deploy/nfpm/install.sh
[warning] 26-26: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 27-27: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 31-31: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 34-34: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 68-68: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 81-81: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 95-95: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 111-111: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 127-127: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 140-140: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 155-155: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 179-179: In POSIX sh, echo flags are undefined.
(SC3037)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build-hoprd-x86_64-linux / binary
- GitHub Check: build-hopli-x86_64-linux / binary
- GitHub Check: hopli / docker
- GitHub Check: hoprd / docker
- GitHub Check: zizmor
- GitHub Check: Cargo Audit
🔇 Additional comments (3)
deploy/nfpm/install.sh (1)
168-176
:/etc/hoprd
may not exist – mkdir it before writing filesThe script writes
/etc/hoprd/hoprd.env
without ensuring the directory exists.
Addmkdir -p /etc/hoprd
right before the first write.scripts/download-workflow-binaries.sh (1)
45-49
:zip
every platform assumeszip
is installed on runnerSelf-hosted machines occasionally lack
zip
.
Add a dependency check or install it (apt-get install -y zip
/apk add zip
) before use, otherwise the script aborts and the workflow fails..github/workflows/package.yaml (1)
58-66
: Missing quotes around expression with spaces
just package ${{ inputs.target }}
expands intojust package armv7l-linux
, i.e. two words; without quotes bash treatsarmv7l-linux
as two args. Wrap in quotes:run: nix develop -c just package "${{ inputs.target }}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/package.yaml (2)
33-44
: Consider pinning download-artifact version
You’ve enabledactions/download-artifact@v3
to fetch real binaries, which fixes previous dummy-artifact issues. For consistency with other actions, you may want to pin this to a specific minor tag or commit (e.g.v3.4.0
) to avoid surprises when v3.x ships breaking changes.
58-66
: Clean up commented dummy-artifact lines
Now that real artifacts are downloaded, you can remove the leftover commented-outecho
andls
lines to streamline the script.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build.yaml
(1 hunks).github/workflows/package.yaml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/build.yaml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
24-24: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
34-34: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
40-40: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: hoprd / docker
- GitHub Check: hoprd-x86_64-linux / binary
- GitHub Check: hopli / docker
- GitHub Check: hopli-x86_64-linux / binary
- GitHub Check: zizmor
- GitHub Check: Cargo Audit
🔇 Additional comments (6)
.github/workflows/package.yaml (6)
18-21
: Concurrency grouping looks solid
Usinggroup: ${{ github.ref }}-package-${{ inputs.target }}
prevents overlapping runs per branch & target.
23-25
: Verify custom runner label
You’re usingself-hosted-hoprnet-small
, which actionlint flags as unknown. If this is a legitimate self-hosted label, please ensure it’s whitelisted in youractionlint.yaml
or that no actionlint policy is blocking it.
27-31
: Pinned checkout step is correct
Lockingactions/checkout
to a specific commit and disabling credential persistence for external repos is a best practice.
45-53
: Nix installation step is well-configured
Pinninginstall-nix-action@v31
and settingnix_path
ensures reproducible builds.
51-57
: Cachix authentication step is good
Using a pinned cachix action and injectingCACHIX_AUTH_TOKEN
covers cache security and performance.
67-83
: Artifact upload steps are correct
Paths and artifact names match the target matrix and use pinned upload actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (2)
deploy/nfpm/install.sh (2)
172-180
: Include all required environment variables
generate_env_file
only invokes host, password, API token, safe address, and module address functions. It must also calladd_rpc_provider_var
,add_hoprd_api_host_var
, andadd_hoprd_api_port_var
before writing out the file to cover all mandatory settings.add_module_address_var + add_rpc_provider_var + add_hoprd_api_host_var + add_hoprd_api_port_var
1-4
: Switch to Bash for POSIX-incompatible featuresThe script uses Bash-specific features (
local
,read -p
,echo -e
) but declares/bin/sh
. Update the shebang to#!/usr/bin/env bash
(or remove all Bashisms) to ensure compatibility and avoid “local: not found” on Debian/Alpine.-#!/bin/sh +#!/usr/bin/env bash
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/package.yaml
(1 hunks)deploy/nfpm/hoprd.service
(1 hunks)deploy/nfpm/install.sh
(1 hunks)scripts/get-current-version.sh
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- scripts/get-current-version.sh
- deploy/nfpm/hoprd.service
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
24-24: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
34-34: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
40-40: the runner of "actions/download-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 Shellcheck (0.10.0)
deploy/nfpm/install.sh
[warning] 26-26: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 27-27: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 31-31: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 34-34: In POSIX sh, 'local' is undefined.
(SC3043)
[warning] 68-68: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 81-81: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 95-95: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 111-111: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 127-127: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 140-140: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 155-155: In POSIX sh, read -p is undefined.
(SC3045)
[warning] 179-179: In POSIX sh, echo flags are undefined.
(SC3037)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: hoprd-x86_64-linux / binary
- GitHub Check: hoprd-armv7l-linux / binary
- GitHub Check: hoprd-aarch64-linux / binary
- GitHub Check: hopli-armv7l-linux / binary
- GitHub Check: hopli-x86_64-linux / binary
- GitHub Check: hopli-aarch64-linux / binary
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: zizmor
- GitHub Check: Cargo Audit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
.github/workflows/build-dappnode.yaml (1)
50-75
: MissingGITHUB_REF_NAME
output breaks later steps
steps.setup
and the summary section expectsteps.vars.outputs.GITHUB_REF_NAME
,
but thevars
step never exports that output. This leaves the variable empty and
causes:
- incorrect branch inference in the Setup variables step (
base_branch
is
empty, so themaster
/release/*
logic is bypassed);- an empty “Branch:” line in the job summary.
Add the output once in each branch of the script:
-echo "source_branch=${{ github.ref_name }}" | tee -a $GITHUB_OUTPUT +echo "source_branch=${{ github.ref_name }}" | tee -a $GITHUB_OUTPUT +echo "GITHUB_REF_NAME=${{ github.ref_name }}" | tee -a $GITHUB_OUTPUT(Repeat the same
echo
in thepull_request_target
branch.)Without this fix the version tagging and summary are silently wrong.
🧹 Nitpick comments (1)
.github/workflows/package.yaml (1)
39-46
: Redundantmkdir -p
invocation
./dist/bin
is created twice (lines 39 and 45).
The second call is unnecessary and slightly clutters the script.- mkdir -p ./dist/bin ... - mkdir -p ./dist/bin + # ./dist/bin is already ensured above
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/build-binaries.yaml
(2 hunks).github/workflows/build-dappnode.yaml
(3 hunks).github/workflows/build.yaml
(2 hunks).github/workflows/package.yaml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/build.yaml
- .github/workflows/build-binaries.yaml
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#6886
File: nix/rust-package.nix:84-84
Timestamp: 2025-02-25T00:35:33.437Z
Learning: When transitioning from vendored dependencies to a private proxy registry in Rust projects, GitHub Actions workflows need to be refactored to accommodate the new update strategy, particularly workflows handling dependency updates like renovate-cargo-update.yaml.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-09-30T08:27:16.849Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-10-09T06:16:18.170Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:66-68
Timestamp: 2025-06-19T10:10:00.368Z
Learning: In the HOPR packaging workflow (.github/workflows/package.yaml), the `just package` command creates a single distribution package that includes all binaries (hoprd and hopli) for the target architecture. The workflow downloads both hoprd and hopli artifacts, extracts them to ./dist/bin, and nfpm packages both binaries together into one .deb, .rpm, or .apk file per target.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:0-0
Timestamp: 2025-06-19T11:37:27.410Z
Learning: In the HOPR packaging workflow (.github/workflows/package.yaml), both hoprd and hopli binaries are downloaded and used together in a single package creation process. The `just package` command creates one distribution package (.deb, .rpm, or .apk) per target that contains both binaries, which is why the workflow only uploads one package per format rather than separate packages for each binary.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6681
File: .github/workflows/build-binaries.yaml:61-97
Timestamp: 2024-11-26T17:47:32.384Z
Learning: The code in the 'Set environment variables' step in `.github/workflows/build-binaries.yaml` is obsolete and should not be reviewed in future code reviews.
.github/workflows/build-dappnode.yaml (13)
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/build-dappnode.yaml:40-40
Timestamp: 2025-05-27T16:23:08.868Z
Learning: In the hoprnet repository's GitHub workflows, labels are passed from build.yaml to build-dappnode.yaml with a trailing comma using `format('{0},', join(github.event.pull_request.labels.*.name, ','))`. Therefore, the condition checks in build-dappnode.yaml correctly use `format('package:{0},', inputs.dappnode_repository)` with a trailing comma to match the exact label format and prevent false positives.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:07:29.649Z
Learning: In GitHub Actions reusable workflows, the github.event_name context may inherit from the parent workflow rather than being set to 'workflow_call', allowing conditions like 'github.event_name == 'pull_request'' to work correctly when the parent workflow was triggered by a pull_request event.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6635
File: .github/workflows/build-dappnode.yaml:51-52
Timestamp: 2024-11-14T17:33:28.735Z
Learning: In the `.github/workflows/build-dappnode.yaml` file, explicit error handling for GitHub API calls is not required.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:08:43.091Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:07:29.649Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:08:43.091Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6681
File: .github/workflows/build-binaries.yaml:61-97
Timestamp: 2024-11-26T17:47:32.384Z
Learning: The code in the 'Set environment variables' step in `.github/workflows/build-binaries.yaml` is obsolete and should not be reviewed in future code reviews.
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#6886
File: nix/rust-package.nix:84-84
Timestamp: 2025-02-25T00:35:33.437Z
Learning: When transitioning from vendored dependencies to a private proxy registry in Rust projects, GitHub Actions workflows need to be refactored to accommodate the new update strategy, particularly workflows handling dependency updates like renovate-cargo-update.yaml.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-10-09T06:16:18.170Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-09-30T08:27:16.849Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6640
File: .github/workflows/load-tests.yaml:13-15
Timestamp: 2024-11-18T10:01:11.871Z
Learning: In GitHub Actions workflows, inputs under `workflow_call` do not support the `enum` property; this property is only available under `workflow_dispatch`.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6681
File: .github/workflows/build-binaries.yaml:0-0
Timestamp: 2024-11-26T17:47:21.777Z
Learning: In `.github/workflows/build-binaries.yaml`, when writing shell scripts in GitHub Actions workflows, the user prefers to set environment variables individually rather than grouping them together.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/add-labels.yaml:49-57
Timestamp: 2025-05-27T16:21:03.705Z
Learning: GitHub CLI (gh) accepts GITHUB_TOKEN as an environment variable for authentication in GitHub Actions workflows, not just GH_TOKEN. The environment variable GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} works correctly with gh commands like "gh pr edit".
.github/workflows/package.yaml (26)
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:66-68
Timestamp: 2025-06-19T10:10:00.368Z
Learning: In the HOPR packaging workflow (.github/workflows/package.yaml), the `just package` command creates a single distribution package that includes all binaries (hoprd and hopli) for the target architecture. The workflow downloads both hoprd and hopli artifacts, extracts them to ./dist/bin, and nfpm packages both binaries together into one .deb, .rpm, or .apk file per target.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:0-0
Timestamp: 2025-06-19T11:37:27.410Z
Learning: In the HOPR packaging workflow (.github/workflows/package.yaml), both hoprd and hopli binaries are downloaded and used together in a single package creation process. The `just package` command creates one distribution package (.deb, .rpm, or .apk) per target that contains both binaries, which is why the workflow only uploads one package per format rather than separate packages for each binary.
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#6886
File: nix/rust-package.nix:84-84
Timestamp: 2025-02-25T00:35:33.437Z
Learning: When transitioning from vendored dependencies to a private proxy registry in Rust projects, GitHub Actions workflows need to be refactored to accommodate the new update strategy, particularly workflows handling dependency updates like renovate-cargo-update.yaml.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:07:29.649Z
Learning: In GitHub Actions reusable workflows, the github.event_name context may inherit from the parent workflow rather than being set to 'workflow_call', allowing conditions like 'github.event_name == 'pull_request'' to work correctly when the parent workflow was triggered by a pull_request event.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/build-dappnode.yaml:40-40
Timestamp: 2025-05-27T16:23:08.868Z
Learning: In the hoprnet repository's GitHub workflows, labels are passed from build.yaml to build-dappnode.yaml with a trailing comma using `format('{0},', join(github.event.pull_request.labels.*.name, ','))`. Therefore, the condition checks in build-dappnode.yaml correctly use `format('package:{0},', inputs.dappnode_repository)` with a trailing comma to match the exact label format and prevent false positives.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/open-pr.yaml:83-95
Timestamp: 2025-06-30T08:36:01.702Z
Learning: The self-hosted-hoprnet-small runners in the hoprnet repository have GitHub CLI (gh) pre-installed and available for use in workflows.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6681
File: .github/workflows/build-binaries.yaml:61-97
Timestamp: 2024-11-26T17:47:32.384Z
Learning: The code in the 'Set environment variables' step in `.github/workflows/build-binaries.yaml` is obsolete and should not be reviewed in future code reviews.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6681
File: .github/workflows/build-binaries.yaml:0-0
Timestamp: 2024-11-26T17:47:21.777Z
Learning: In `.github/workflows/build-binaries.yaml`, when writing shell scripts in GitHub Actions workflows, the user prefers to set environment variables individually rather than grouping them together.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-09-30T08:27:16.849Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6502
File: flake.nix:12-14
Timestamp: 2024-10-09T06:16:18.170Z
Learning: The project already has CI workflows that automatically check for compatibility issues when updating dependencies, including compiling smart contracts with new Solidity versions, running the test suite, checking for compiler warnings or deprecation notices, and reviewing changelogs for breaking changes.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/open-pr.yaml:34-43
Timestamp: 2025-06-30T08:33:20.974Z
Learning: In the hoprnet repository, the maintainer ausias-armesto prefers to add commit types to the semantic PR validation workflow incrementally as needed, rather than preemptively adding all possible types. This conservative approach keeps the workflow configuration lean.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6635
File: .github/workflows/build-dappnode.yaml:51-52
Timestamp: 2024-11-14T17:33:28.735Z
Learning: In the `.github/workflows/build-dappnode.yaml` file, explicit error handling for GitHub API calls is not required.
Learnt from: tolbrino
PR: hoprnet/hoprnet#7070
File: nix/testShell.nix:22-23
Timestamp: 2025-04-15T19:24:23.570Z
Learning: In the HOPR project, the `autoPatchelf` command from Nix can handle the case where the target directory (like ./.venv) doesn't exist, so no additional directory existence check is needed before running it.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:07:29.649Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:08:43.091Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: .github/workflows/package.yaml:28-28
Timestamp: 2025-06-19T10:08:43.091Z
Learning: In GitHub Actions reusable workflows, the github context from the caller workflow is inherited by the called workflow, so github.event_name reflects the original triggering event (e.g., 'pull_request') rather than being set to 'workflow_call'. Conditions like 'github.event_name == 'pull_request'' work correctly in reusable workflows when the parent workflow was triggered by that event type.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#6640
File: .github/workflows/load-tests.yaml:13-15
Timestamp: 2024-11-18T10:01:11.871Z
Learning: In GitHub Actions workflows, inputs under `workflow_call` do not support the `enum` property; this property is only available under `workflow_dispatch`.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7191
File: .github/workflows/add-labels.yaml:49-57
Timestamp: 2025-05-27T16:21:03.705Z
Learning: GitHub CLI (gh) accepts GITHUB_TOKEN as an environment variable for authentication in GitHub Actions workflows, not just GH_TOKEN. The environment variable GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} works correctly with gh commands like "gh pr edit".
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#6972
File: .github/workflows/audit-pr.yaml:25-32
Timestamp: 2025-04-02T11:36:56.281Z
Learning: For HOPR projects, auditing tools like cargo-audit should be managed through the Nix environment rather than installed separately to ensure consistency and reproducibility.
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#7142
File: .github/labeler.yml:95-106
Timestamp: 2025-05-26T22:04:22.750Z
Learning: In .github/labeler.yml, both legacy crate labels (like hopr-path, hopr-platform) and new crate labels (like hopr-chain-actions, hopr-chain-api) can coexist in the same file. When new crate labels are added, it doesn't necessarily mean old ones are deprecated or should be removed.
Learnt from: Teebor-Choka
PR: hoprnet/hoprnet#6545
File: transport/p2p/src/swarm.rs:491-494
Timestamp: 2024-10-11T10:43:34.869Z
Learning: When reviewing revert pull requests in the `hoprnet/hoprnet` repository, avoid making code recommendations or suggestions.
Learnt from: mjadach-iv
PR: hoprnet/hoprnet#6663
File: deploy/compose/.env.sample:57-57
Timestamp: 2024-11-21T13:58:22.345Z
Learning: In code reviews for this project, focus comments on the changes made in the PR, and avoid discussing unrelated code.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: deploy/nfpm/install.sh:68-68
Timestamp: 2025-06-19T10:11:36.259Z
Learning: In the HOPR project, the user ausias-armesto prefers interactive installation prompts that give users full control over configuration rather than automated defaults, especially for initial versions of installation scripts.
Learnt from: ausias-armesto
PR: hoprnet/hoprnet#7251
File: README.md:166-171
Timestamp: 2025-06-30T10:14:33.643Z
Learning: The maintainer ausias-armesto prefers to keep environment variable configuration steps directly within installation instructions rather than separating them into different sections, as demonstrated with the Alpine package manager installation section in the README.md.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6399
File: common/primitive-types/Cargo.toml:24-24
Timestamp: 2024-11-01T09:32:55.651Z
Learning: In the hoprnet project, dependency versions are defined in the workspace Cargo.toml, so it's not necessary to specify them in individual package Cargo.toml files.
Learnt from: tolbrino
PR: hoprnet/hoprnet#6399
File: db/entity/Cargo.toml:4-4
Timestamp: 2024-10-21T14:58:45.665Z
Learning: In the HOPR project, crate versions are intentionally kept separate and do not need to be aligned across related packages.
🪛 actionlint (1.7.7)
.github/workflows/package.yaml
26-26: label "self-hosted-hoprnet-small" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: tests-unit-nightly
- GitHub Check: tests-unit
- GitHub Check: hoprd / docker
- GitHub Check: hopli / docker
- GitHub Check: Docs / Rust
- GitHub Check: Audit / Audit
- GitHub Check: Zizmor / Zizmor
- GitHub Check: Lint / Lint
🔇 Additional comments (1)
.github/workflows/package.yaml (1)
36-68
:jq
/unzip
may be missing on the self-hosted runnerThe download step relies on both
jq
andunzip
, but the custom runner
self-hosted-hoprnet-small
isn’t guaranteed to have them.
A missing binary will surface as a cryptic “command not found” failure.Consider installing them defensively:
- run: | set -euo pipefail + command -v jq >/dev/null 2>&1 || sudo apt-get update && sudo apt-get install -y jq + command -v unzip >/dev/null 2>&1 || sudo apt-get update && sudo apt-get install -y unzip mkdir -p ./dist/bin …Alternatively, document the requirement in the runner bootstrap script.
Improve workflows to be able to create OS packages for debian, redhat and alpine