From f9b28d5678b351f06365ed683c6a948669fe23fd Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Thu, 10 Oct 2024 21:17:53 +0200 Subject: [PATCH] workflows/codeowners: Cache codeowner validator build The codeowner-validator build declared in ci/codeowners-validator was not cached before and needed to be built for every PR, which is slow and wasteful: https://github.com/NixOS/nixpkgs/actions/runs/11280533037/job/31373720922 --- .github/workflows/codeowners.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/codeowners.yml b/.github/workflows/codeowners.yml index 164b5a1136f2..56588d45c9cd 100644 --- a/.github/workflows/codeowners.yml +++ b/.github/workflows/codeowners.yml @@ -25,6 +25,13 @@ jobs: steps: - uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 + - uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15 + if: github.repository_owner == 'NixOS' + with: + # This cache is for the nixpkgs repo checks and should not be trusted or used elsewhere. + name: nixpkgs-ci + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + # Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR itself. # We later build and run code from the base branch with access to secrets, # so it's important this is not the PRs code.