Add production cache #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
extra_nix_config: | | |
accept-flake-config = true | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.BUILDER_TOKEN }} | |
- uses: gacts/run-and-post-run@v1 | |
with: | |
run: nix flake check | |
post: | | |
TARGET="ssh://[email protected]" | |
# took this filter list from cachix action | |
find /nix/store -mindepth 1 -maxdepth 1 -type d -not -name ".*" -not -name "*.{drv,drv.chroot,check,lock}" -print -exec nix copy --to $TARGET {} \; | |