Shared composite GitHub Actions, consumed by other netbird repos.
Each action lives under actions/<name>/ with its own action.yml. Tests live under .github/workflows/test-<name>.yml and are gated by paths: filters, so an action's CI only runs when that action (or its workflow) changes.
Parse a refs/tags/vX.Y.Z[-prerelease][+build] or plain vX.Y.Z string into version components. Falls back to 0.0.0 when no version tag is found.
Inputs
| name | required | default | description |
|---|---|---|---|
input_string |
no | '' |
Ref/tag string to parse. If omitted or empty, github.ref is used. |
Outputs
| name | example | description |
|---|---|---|
major |
1 |
Major version number. |
minor |
2 |
Minor version number. |
patch |
3 |
Patch version number. |
prerelease |
rc.1 |
Prerelease identifier, empty when absent. |
build |
build.7 |
Build metadata, empty when absent. |
fullversion |
1.2.3 |
MAJOR.MINOR.PATCH joined. |
Usage
Tag-triggered workflow, omit with: to read github.ref:
- id: semver
uses: netbirdio/shared-actions/actions/parse-semver@<commit-sha or tag>
- run: echo "version=${{ steps.semver.outputs.fullversion }}"Workflow-dispatch with an explicit tag input:
- id: semver
uses: netbirdio/shared-actions/actions/parse-semver@<commit-sha or tag>
with:
input_string: ${{ inputs.tag }}Download a file on a Windows runner and optionally verify its SHA-256 checksum. Fails the step on hash mismatch when a checksum is provided. Uses PowerShell (Invoke-WebRequest, Get-FileHash); intended for windows-* runners.
Inputs
| name | required | default | description |
|---|---|---|---|
url |
yes | — | URL to download from. |
destination |
yes | — | Full filesystem path including the filename (e.g. C:\temp\wintun.zip, not just C:\temp). Parent directories are created if they do not exist. |
sha256 |
no | '' |
Expected SHA-256 checksum (hex, case-insensitive). When set, the action fails if the downloaded file does not match. Leave empty to skip verification. |
Outputs
| name | description |
|---|---|
file-path |
Absolute path to the downloaded file, written to GITHUB_OUTPUT so later steps can reference it as ${{ steps.<id>.outputs.file-path }}. |
Usage
- id: wintun
uses: netbirdio/shared-actions/actions/win-download-and-verify@<commit-sha or tag>
with:
url: https://pkgs.netbird.io/wintun/wintun-0.14.1.zip
destination: ${{ runner.temp }}\wintun.zip
sha256: 07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51
- shell: pwsh
run: tar -zxf "${{ steps.wintun.outputs.file-path }}" -C "${{ runner.temp }}"