Skip to content

Commit

Permalink
Try building without downloading everything
Browse files Browse the repository at this point in the history
Try the trick from NixOS/nix#3946 (comment)
  • Loading branch information
arianvp committed Jun 7, 2024
1 parent fd672c5 commit e9d1bde
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/push-based-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,20 @@ jobs:
sudo aws configure set aws_secret_access_key ${{ steps.aws.outputs.aws-secret-access-key }}
sudo aws configure set aws_session_token ${{ steps.aws.outputs.aws-session-token }}
sudo aws configure set region eu-central-1
- id: get-cache-secret-key
name: Get cache secret key
run: echo "${{ secrets.CACHE_SECRET_KEY }}" > cache-secret-key
- id: build
name: Build
run: |
nix build .#nixosConfigurations.web-push.config.system.build.toplevel --extra-substituters '${{ vars.CACHE_BUCKET }}' --extra-trusted-public-keys '${{ vars.CACHE_PUBLIC_KEY }}'
nix build \
--extra-substituters '${{ vars.CACHE_BUCKET }}' \
--extra-trusted-public-keys '${{ vars.CACHE_PUBLIC_KEY }}' \
--store "${{ vars.CACHE_BUCKET }}&secret-key=$(realpath ./cache-secret-key)" \
--builders 'auto' \
.#nixosConfigurations.web-push.config.system.build.toplevel
out_path=$(readlink ./result)
echo "out_path=$out_path" >> "$GITHUB_OUTPUT"
- id: sign
name: Sign
run: |
echo "${{ secrets.CACHE_SECRET_KEY }}" > cache-secret-key
nix store sign --recursive --key-file cache-secret-key ${{ steps.build.outputs.out_path }}
- id: copy
name: Copy
run: |
nix copy --to "${{ vars.CACHE_BUCKET }}" ${{ steps.build.outputs.out_path }}
- id: deploy
name: Deploy
run: |
Expand Down

0 comments on commit e9d1bde

Please sign in to comment.