Build and cache VM image #37
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: Build and cache VM image | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| [ | |
| "!flake.nix", | |
| "!lib/**", | |
| "!module/**", | |
| "!pkgs/vm-runner/**", | |
| "!README.md", | |
| "flake.lock", | |
| "pkgs/vm-image/**", | |
| ] | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| paths: | |
| [ | |
| "!flake.nix", | |
| "!lib/**", | |
| "!module/**", | |
| "!pkgs/vm-runner/**", | |
| "!README.md", | |
| "flake.lock", | |
| "pkgs/vm-image/**", | |
| ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: packages.aarch64-linux.vm-image | |
| if: github.event_name != 'pull_request' || github.event.pull_request.merged == true | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| enable_kvm: true | |
| extra_nix_config: "system-features = kvm" | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Cachix | |
| uses: cachix/cachix-action@v17 | |
| with: | |
| name: virby-nix-darwin | |
| authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| - name: Nix build | |
| run: nix build -L .#packages.aarch64-linux.vm-image |