Skip to content

Commit

Permalink
CI: Switch to Cachix for Nix caching. (#133)
Browse files Browse the repository at this point in the history
### What

We are mostly not using our cache, because GitHub's own cache
rate-limits us to the point where it's unusable.

Cachix should do better.

### How

Replace the Magic Nix Cache action with the Cachix action, using our
newly-minted auth token.
  • Loading branch information
SamirTalwar committed Nov 2, 2023
1 parent f470da0 commit a11c72d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ jobs:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Install Nix ❄
uses: DeterminateSystems/nix-installer-action@v6

- name: Run the Magic Nix Cache 🔌
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install Nix ❄
uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up the Nix Cache 🔌
uses: cachix/cachix-action@v12
with:
name: hasura-v3-dev
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Build the Docker image 🔨
run: |
docker load < $(nix build --no-link --print-out-paths '.#ndc-postgres-docker')
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build-images-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@ jobs:
uses: actions/checkout@v4

- name: Install Nix ❄
uses: DeterminateSystems/nix-installer-action@v6
uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Run the Magic Nix Cache 🔌
uses: DeterminateSystems/magic-nix-cache-action@v2
- name: Set up the Nix Cache 🔌
uses: cachix/cachix-action@v12
with:
name: hasura-v3-dev
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- id: gcloud-auth
name: Authenticate to Google Cloud 🔑
Expand Down

0 comments on commit a11c72d

Please sign in to comment.