feat: nixos wip #4
Workflow file for this run
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 check Nix config | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| paths: | |
| - ".github/workflows/nix.yaml" | |
| - "config/nix/**" | |
| pull_request: | |
| paths: | |
| - ".github/workflows/nix.yaml" | |
| - "config/nix/**" | |
| workflow_call: null | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-nix-config: | |
| concurrency: | |
| # Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context | |
| # github.head_ref: head_ref or source branch of the pull request | |
| # github.ref: ref of the branch that triggered the workflow | |
| group: ${{ github.workflow }}-test-nix-config-${{ github.head_ref || github.ref }}-${{ github.event_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: read | |
| statuses: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install nix | |
| uses: cachix/install-nix-action@v31.10.2 | |
| with: | |
| enable_kvm: true | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - run: nix build | |
| - run: nix flake check | |
| - run: nix-shell --run "echo OK" |