Przeglądaj źródła

nix: fix workflow failing on PRs (#4820)

Co-authored-by: Github Action <[email protected]>
Albert O'Shea 4 miesięcy temu
rodzic
commit
ea7c213f5d
2 zmienionych plików z 5 dodań i 3 usunięć
  1. 2 0
      .github/workflows/update-nix-hashes.yml
  2. 3 3
      flake.lock

+ 2 - 0
.github/workflows/update-nix-hashes.yml

@@ -18,6 +18,7 @@ on:
 
 
 jobs:
 jobs:
   update:
   update:
+    if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     env:
     env:
       SYSTEM: x86_64-linux
       SYSTEM: x86_64-linux
@@ -29,6 +30,7 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           token: ${{ secrets.GITHUB_TOKEN }}
           fetch-depth: 0
           fetch-depth: 0
           ref: ${{ github.head_ref || github.ref_name }}
           ref: ${{ github.head_ref || github.ref_name }}
+          repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
 
 
       - name: Setup Nix
       - name: Setup Nix
         uses: DeterminateSystems/nix-installer-action@v20
         uses: DeterminateSystems/nix-installer-action@v20

+ 3 - 3
flake.lock

@@ -2,11 +2,11 @@
   "nodes": {
   "nodes": {
     "nixpkgs": {
     "nixpkgs": {
       "locked": {
       "locked": {
-        "lastModified": 1764138170,
-        "narHash": "sha256-2bCmfCUZyi2yj9FFXYKwsDiaZmizN75cLhI/eWmf3tk=",
+        "lastModified": 1764167966,
+        "narHash": "sha256-nXv6xb7cq+XpjBYIjWEGTLCqQetxJu6zvVlrqHMsCOA=",
         "owner": "NixOS",
         "owner": "NixOS",
         "repo": "nixpkgs",
         "repo": "nixpkgs",
-        "rev": "bb813de6d2241bcb1b5af2d3059f560c66329967",
+        "rev": "5c46f3bd98147c8d82366df95bbef2cab3a967ea",
         "type": "github"
         "type": "github"
       },
       },
       "original": {
       "original": {