From e3ade32b1ac7ab3b5c5f0f04f9e8f80be0c21205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Sat, 29 Oct 2022 22:58:44 +0200 Subject: [PATCH] .github: re-add access token (#553) Co-authored-by: Yannik Sander --- .github/actions/common-setup/action.yml | 9 +++++++-- .github/workflows/build-flake-info.yml | 1 + .github/workflows/check-flake-files.yml | 1 + .github/workflows/frontend.yml | 1 + .github/workflows/import-to-elasticsearch.yml | 3 +++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/actions/common-setup/action.yml b/.github/actions/common-setup/action.yml index f5293bd..1db5821 100644 --- a/.github/actions/common-setup/action.yml +++ b/.github/actions/common-setup/action.yml @@ -1,5 +1,8 @@ name: Setup Environment inputs: + GITHUB_TOKEN: + required: true + description: 'GitHub access token used to prevent GitHub's rate limit for unauthenticated requests' CACHIX_SIGNING_KEY: # determines what node version to install required: true description: 'Cachix Signing Key' @@ -8,11 +11,13 @@ runs: steps: - name: Installing Nix - uses: cachix/install-nix-action@v16 + uses: cachix/install-nix-action@v18 with: nix_path: nixpkgs=channel:nixpkgs-unstable + extra_nix_config: | + access-tokens = github.com=${{ inputs.GITHUB_TOKEN }} - - uses: cachix/cachix-action@v10 + - uses: cachix/cachix-action@v12 with: name: nixos-search signingKey: '${{ inputs.CACHIX_SIGNING_KEY }}' diff --git a/.github/workflows/build-flake-info.yml b/.github/workflows/build-flake-info.yml index 5db2cee..eb8ac79 100644 --- a/.github/workflows/build-flake-info.yml +++ b/.github/workflows/build-flake-info.yml @@ -20,6 +20,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} diff --git a/.github/workflows/check-flake-files.yml b/.github/workflows/check-flake-files.yml index ea1472e..e87ae35 100644 --- a/.github/workflows/check-flake-files.yml +++ b/.github/workflows/check-flake-files.yml @@ -24,6 +24,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} - name: Try importing all custom flakes diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index efd0857..81b4e3a 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -21,6 +21,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} diff --git a/.github/workflows/import-to-elasticsearch.yml b/.github/workflows/import-to-elasticsearch.yml index f2ccaab..bf6a59a 100644 --- a/.github/workflows/import-to-elasticsearch.yml +++ b/.github/workflows/import-to-elasticsearch.yml @@ -20,6 +20,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} - name: NixOS Channels @@ -50,6 +51,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} - name: Import ${{ matrix.channel }} channel @@ -89,6 +91,7 @@ jobs: - name: Setup uses: ./.github/actions/common-setup with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} - name: Import ${{ matrix.group }} group