From cc5c902fdf94b798c3b68e55ebb7e1a1185113a1 Mon Sep 17 00:00:00 2001 From: Vincent Haupert Date: Sun, 12 Sep 2021 20:03:35 +0200 Subject: github-runner: use dummy SHA-1 as `GitInfoCommitHash` The runner only references `GitInfoCommitHash`/`CommitHash` to print informational log entries. To allow for just referencing the tag of a version instead of the commit hash, this commit sets the value of the `GitInfoCommitHash` to a static dummy value. --- .../tools/continuous-integration/github-runner/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkgs/development') diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix index b7da1970da2..2d7df078f8c 100644 --- a/pkgs/development/tools/continuous-integration/github-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix @@ -30,6 +30,7 @@ let dotnetSdk = dotnetCorePackages.sdk_3_1; runtimeId = "linux-x64"; + fakeSha1 = "0000000000000000000000000000000000000000"; in stdenv.mkDerivation rec { pname = "github-runner"; @@ -38,7 +39,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "actions"; repo = "runner"; - rev = "c8caf59bb7adaa87c4cf8f61372670d338a13f2d"; # v${version} + rev = "v${version}"; sha256 = "sha256-Nl1FSjwweVqdQEVhqt4PEcqZbF7htNT279yx1nGuAe0="; }; @@ -126,7 +127,7 @@ stdenv.mkDerivation rec { -p:PackageRuntime="${runtimeId}" \ -p:BUILDCONFIG="Release" \ -p:RunnerVersion="${version}" \ - -p:GitInfoCommitHash="${src.rev}" \ + -p:GitInfoCommitHash="${fakeSha1}" \ src/dir.proj runHook postBuild @@ -191,7 +192,7 @@ stdenv.mkDerivation rec { -p:PackageRuntime="${runtimeId}" \ -p:BUILDCONFIG="Debug" \ -p:RunnerVersion="${version}" \ - -p:GitInfoCommitHash="${src.rev}" \ + -p:GitInfoCommitHash="${fakeSha1}" \ src/dir.proj runHook postCheck -- cgit 1.4.1