From 760dabbd01f7b28edbf061c24c229e0ca47bbac9 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 4 Feb 2026 18:02:12 -0500 Subject: [PATCH 1/2] Update docker hub readme task and fix version in README (#316) Signed-off-by: Pieter Viljoen --- .github/workflows/publish-docker-readme-task.yml | 12 ++++++------ README.md | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docker-readme-task.yml b/.github/workflows/publish-docker-readme-task.yml index c11e16b8..9649fbb0 100644 --- a/.github/workflows/publish-docker-readme-task.yml +++ b/.github/workflows/publish-docker-readme-task.yml @@ -16,11 +16,11 @@ jobs: - name: Checkout step uses: actions/checkout@v6 - - name: Load matrix.json step - id: getrepos - # Create array of docker hub repositories from matrix.json - run: | - echo "repos=$(jq --compact-output '[.Images[].Name | ascii_downcase | \"ptr727/\\(.)\"] | sort | unique' ./Make/Matrix.json)" >> "$GITHUB_OUTPUT" + - name: Load matrix.json step + id: getrepos + # Create array of docker hub repositories from matrix.json + run: | + echo "repos=$(jq --compact-output '[.Images[].Name | ascii_downcase | \"ptr727/\\(.)\"] | sort | unique' ./Make/Matrix.json)" >> "$GITHUB_OUTPUT" publish-readme: name: Publish docker hub readme job @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v6 - name: Update docker hub description step - uses: peter-evans/dockerhub-description@v4 + uses: peter-evans/dockerhub-description@v5 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} diff --git a/README.md b/README.md index c4dc4da4..52bd7e01 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This is a project to build and publish docker images for various [Network Optix] ### Release Notes -**Version: 3.0**: +**Version: 2.9**: **Summary**: @@ -696,7 +696,7 @@ Licensed under the [MIT License][license-link]\ [nxwitnessreleasenotes-link]: https://www.networkoptix.com/all-nx-witness-release-notes [nxwitnessreleases-link]: https://updates.vmsproxy.com/default/releases.json [packages-link]: https://updates.networkoptix.com/default/38363/packages.json -[releasebuildstatus-shield]: https://img.shields.io/github/actions/workflow/status/ptr727/NxWitness/BuildPublishPipeline.yml?branch=main&logo=github&label=Build%20Status +[releasebuildstatus-shield]: https://img.shields.io/github/actions/workflow/status/ptr727/NxWitness/publish-release.yml?branch=main&logo=github&label=Build%20Status [releaseinfo-link]: https://github.com/networkoptix/nx_open/blob/master/vms/libs/nx_vms_update/src/nx/vms/update/releases_info.cpp [s6overlay-link]: https://github.com/just-containers/s6-overlay [thehomegithub-link]: https://github.com/thehomerepot/nxwitness From de8c534775d0d23ffa8ce70f37ed022b4c08ec52 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Wed, 4 Feb 2026 19:29:14 -0500 Subject: [PATCH 2/2] Update GitHub Copilot guidance, enhance Docker build caching, and modify workspace settings (#318) * Update docker hub readme task and fix version in README (#316) (#317) Signed-off-by: Pieter Viljoen * Update GitHub Copilot guidance, enhance Docker build caching, and modify workspace settings Signed-off-by: Pieter Viljoen --------- Signed-off-by: Pieter Viljoen --- .github/copilot-instructions.md | 8 ++++++++ .github/workflows/build-docker-task.yml | 8 +++++--- HISTORY.md | 1 + NxWitness.code-workspace | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index af2f4063..269352c2 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,9 +1,11 @@ # GitHub Copilot Guidance ## Purpose + This file summarizes the solution and defines the hierarchy of guidance for AI-assisted contributions. ## Guidance Hierarchy (Must Follow) + 1. [CODESTYLE.md](../CODESTYLE.md) is the master code style and formatting authority. 2. [AGENTS.md](../AGENTS.md) is secondary guidance describing the solution, workflows, and conventions. 3. Repository configuration files such as [`.editorconfig`](../.editorconfig) and [`.vscode/tasks.json`](../.vscode/tasks.json) define enforced formatting, line endings, and task expectations. @@ -11,27 +13,33 @@ This file summarizes the solution and defines the hierarchy of guidance for AI-a If any instruction conflicts, follow CODESTYLE.md first, then AGENTS.md. ## Solution Summary + This repository builds and publishes Docker images for Network Optix VMS products (Nx Witness, Nx Meta, Nx Go, DW Spectrum, Wisenet WAVE). It includes a .NET tooling project that generates Dockerfiles, matrices, and version inputs used by CI and packaging scripts. ### Core Projects + - `CreateMatrix` (.NET 10 console app): Generates Dockerfiles and build matrix data using version and release metadata. - `CreateMatrixTests` (xUnit v3 + AwesomeAssertions): Validates release handling and version forwarding. ### Key Inputs and Outputs + - Inputs: version and matrix data in `version.json`, [Make/Version.json](../Make/Version.json), and [Make/Matrix.json](../Make/Matrix.json). - Outputs: Dockerfiles in [Docker/](../Docker/) and compose/test artifacts in [Make/](../Make/). - Templates: Unraid container templates in [Unraid/](../Unraid/). ### Build and Validation Workflow (High Level) + - Primary entry points are the `CreateMatrix` CLI commands (version, matrix, make) run directly or via scripts in [Make/](../Make/). - Formatting and style verification are enforced by CSharpier and dotnet format, with Husky.Net hooks. - The `.Net Format` VS Code task in [`.vscode/tasks.json`](../.vscode/tasks.json) must be clean and warning-free at all times. ## What to Keep in Sync + - Generated Dockerfiles and scripts must reflect CreateMatrix behavior. - Documentation in [README.md](../README.md) and release notes should align with current outputs and supported product variants. ## Expectations for Changes + - Follow the zero-warnings policy and formatting requirements in [CODESTYLE.md](../CODESTYLE.md). - Use explicit types (no `var`), Allman braces, file-scoped namespaces, and other conventions as defined in the master style guide. - Respect line endings and encoding rules from the repository configuration, including UTF-8 without BOM. diff --git a/.github/workflows/build-docker-task.yml b/.github/workflows/build-docker-task.yml index df13710a..fb40eb5b 100644 --- a/.github/workflows/build-docker-task.yml +++ b/.github/workflows/build-docker-task.yml @@ -87,11 +87,13 @@ jobs: - name: Docker build and push step uses: docker/build-push-action@v6 with: - push: ${{ inputs.push && (github.ref_name == matrix.images.Branch)}} - cache-from: type=gha,scope=${{ matrix.images.CacheScope }} - cache-to: type=gha,mode=max,scope=${{ matrix.images.CacheScope }} + push: ${{ inputs.push && (github.ref_name == matrix.images.Branch) }} context: Docker file: Docker/${{ matrix.images.Name }}.Dockerfile platforms: linux/amd64,linux/arm64 tags: ${{ steps.tagsargs.outputs.tags }} build-args: ${{ steps.tagsargs.outputs.args }} + cache-from: | + type=gha,scope=develop-${{ matrix.images.Name }} + type=gha,scope=main-${{ matrix.images.Name }} + cache-to: ${{ (github.ref_name == 'main' || github.ref_name == 'develop') && format('type=gha,mode=max,scope={0}-{1}', github.ref_name, matrix.images.Name) || 'type=gha,mode=min,scope=ro' }} diff --git a/HISTORY.md b/HISTORY.md index bad86665..1d684c28 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,7 @@ This is a project to build and publish docker images for various [Network Optix] - Refactoring to match layout and style used in other projects. - Updated to .NET 10, adding support for Nullable, and AOT. - Restructured CLI handling logic. + - Update GHA cache usage to prevent the cache from running out of space. - Version 2.8: - Add default `analytics` volume, along with `media` and `backup` volumes, media server complains when sharing analytics storage. - Version 2.7: diff --git a/NxWitness.code-workspace b/NxWitness.code-workspace index c6ac0d3b..15e882f2 100644 --- a/NxWitness.code-workspace +++ b/NxWitness.code-workspace @@ -75,6 +75,7 @@ "ssdpool", "subvol", "subvolid", + "tagsargs", "TARGETARCH", "TARGETPLATFORM", "tmpfs",