From b3dfb8d13cc2888618f109455b215c76f79ffed9 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Mon, 23 Mar 2026 20:50:01 -0700 Subject: [PATCH] Remove Dockerfile version fallback from nix build path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nix builds should resolve version from default.nix or nixpkgs only — falling back to Dockerfile's CONTAINER_APP_VERSION masks real errors. Co-Authored-By: Claude Opus 4.6 (1M context) --- .forgejo/workflows/build-container.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.forgejo/workflows/build-container.yaml b/.forgejo/workflows/build-container.yaml index 6533449..7f09630 100644 --- a/.forgejo/workflows/build-container.yaml +++ b/.forgejo/workflows/build-container.yaml @@ -143,14 +143,7 @@ jobs: VERSION=$(grep -m1 '^\s*version\s*=\s*"' "$NIX_FILE" \ | sed 's/.*"\(.*\)".*/\1/' || true) - # Fall back to CONTAINER_APP_VERSION from Dockerfile - if [ -z "$VERSION" ] && [ -f "containers/$CONTAINER/Dockerfile" ]; then - VERSION=$(grep -m1 '^ARG CONTAINER_APP_VERSION=' \ - "containers/$CONTAINER/Dockerfile" \ - | sed 's/^ARG CONTAINER_APP_VERSION=//') - fi - - # Last resort: nix eval for nixpkgs packages + # Fall back to nix eval for nixpkgs packages if [ -z "$VERSION" ]; then VERSION=$(nix --extra-experimental-features "nix-command flakes" \ eval --raw "nixpkgs#${CONTAINER}.version")