diff --git a/.github/workflows/nix-pr-check.yml b/.github/workflows/nix-pr-check.yml new file mode 100644 index 00000000..56cc8324 --- /dev/null +++ b/.github/workflows/nix-pr-check.yml @@ -0,0 +1,30 @@ +name: Check nix flake + +on: + pull_request: + branches: [master, main] + paths: + - "flake.*" + - "distro/nix/**" +jobs: + check-flake: + runs-on: ubuntu-latest + steps: + - name: Create GitHub App token + id: app_token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ steps.app_token.outputs.token }} + + - name: Install Nix + uses: cachix/install-nix-action@v31 + + - name: Update vendorHash in flake.nix + run: nix flake check