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",