Added caching restore and save action
All checks were successful
Nix Web Proxy Worker / setup-nixos-runner (push) Successful in 15m4s

This commit is contained in:
2025-10-03 20:59:58 +02:00
parent e85ccb4f50
commit e9755dd23f

View File

@@ -7,14 +7,27 @@ jobs:
run-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.WEB_PROXY_SSH_PRIVATE_KEY }}
- uses: cachix/install-nix-action@v31
- uses: actions/cache@v4
with:
path: /nix/store
- name: Ensure known host name
run: ssh-keyscan ${{ vars.WEB_PROXY_IP }} >> ~/.ssh/known_hosts
- name: Restore Cache Nix Store
id: nix-cache-restore
uses: actions/cache/restore@v4
with:
path: /nix/store
key: ${{ runner.os }}-web-proxy-nix-store
- name: Apply Nix build to Web Proxy host
run: nix-shell shell.nix --run "nixos-rebuild switch --no-flake --target-host ${{ vars.WEB_PROXY_TARGET_HOST }}"
- name: Save Cache Nix Store
uses: actions/cache/save@v4
with:
path: /nix/store
key: ${{ steps.nix-cache-restore.outputs.cache-primary-key }}