summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
blob: 316c291f8795711cb3fe0566e7de0f2d1efcdb8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: CI

on:
  push:
    branches: [main]
  workflow_dispatch:

jobs:
  test:
    name: Run test (with `${{ matrix.sources }}`)

    runs-on: ubuntu-latest

    strategy:
      matrix:
        sources: ["", "nixpkgs nixos-24.05"]

    permissions:
      contents: write 
      pull-requests: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

      - name: Install Nix
        uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v27

      - name: Install npins
        run: |
          nix profile install 'nixpkgs#npins'

      - name: Update npins sources
        uses: ./.
        with:
          sources: "nixpkgs"
          npins-directory: ./test/npins
          commit-message: "test: update npins sources"