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.
main
Vincent Haupert 3 years ago
parent cf11c97010
commit cc5c902fdf
No known key found for this signature in database
GPG Key ID: A8B605E96F82B4E4
  1. 7
      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

Loading…
Cancel
Save