github: add a cachix action #1
This file contains hidden or 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: Cachix | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| # Clone repo | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - uses: handelsblattmediagroup/lix-quick-install-action@v3.0.4 | |
| - name: Cachix setup | |
| uses: cachix/cachix-action@v12 | |
| with: | |
| name: somasis | |
| # you need to create the secret named CACHIX_AUTH_TOKEN | |
| # with the personal access token created. | |
| authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| skipPush: true | |
| # Build a configuration.nix file that doesn't use flakes | |
| # and push to cachix. | |
| - name: Build ilo | |
| run: nix-build . -A nixosConfigurations.ilo.config.system.build.toplevel --keep-going | |
| - name: Cache built derivation | |
| run: realpath result | cachix push somasis |