summary refs log tree commit diff
path: root/pkgs/development/tools/continuous-integration/github-runner/default.nix
diff options
context:
space:
mode:
authorVincent Haupert <mail@vincent-haupert.de>2021-09-12 20:03:35 +0200
committerVincent Haupert <mail@vincent-haupert.de>2021-09-13 19:15:33 +0200
commitcc5c902fdf94b798c3b68e55ebb7e1a1185113a1 (patch)
tree4553d249d0a7ac6eaa0a64a1854dddce08b04029 /pkgs/development/tools/continuous-integration/github-runner/default.nix
parentcf11c970104cc49f820a2a5e5cc4f27bb34c5119 (diff)
downloadnixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar.gz
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar.bz2
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar.lz
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar.xz
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.tar.zst
nixpkgs-cc5c902fdf94b798c3b68e55ebb7e1a1185113a1.zip
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.
Diffstat (limited to 'pkgs/development/tools/continuous-integration/github-runner/default.nix')
-rw-r--r--pkgs/development/tools/continuous-integration/github-runner/default.nix7
1 files changed, 4 insertions, 3 deletions
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