summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2024-06-04 12:00:21 +0000
committerGitHub <[email protected]>2024-06-04 08:00:21 -0400
commit6219d0b7cfea271bffbc0ba11956373b55db17cf (patch)
tree124d9dd1f01b31f111095d133ff769a04f717b94
parent1c3c62b0eff2e1db0c3a58729e0adc8d8c41e501 (diff)
fix: running without specific inputs passed (#1)v0.1.2
-rw-r--r--.github/workflows/ci.yaml6
-rw-r--r--action.yaml6
-rw-r--r--test/npins/sources.json6
3 files changed, 16 insertions, 2 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 458b81f..edbf017 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -7,10 +7,14 @@ on:
jobs:
test:
- name: Run test
+ name: Run test (with `${{ matrix.sources }}`)
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ sources: ["", "nixpkgs nixos-24.05"]
+
permissions:
contents: write
pull-requests: write
diff --git a/action.yaml b/action.yaml
index 64a9201..3d19c0d 100644
--- a/action.yaml
+++ b/action.yaml
@@ -70,7 +70,11 @@ runs:
NPINS_DIRECTORY: ${{ inputs.npins-directory }}
shell: bash
run: |
- npins update "${SOURCES[@]}"
+ if [ "$SOURCES" = "" ]; then
+ npins update
+ else
+ npins update $SOURCES
+ fi
- name: Create PR
id: pr
diff --git a/test/npins/sources.json b/test/npins/sources.json
index d2e254b..3b18703 100644
--- a/test/npins/sources.json
+++ b/test/npins/sources.json
@@ -1,5 +1,11 @@
{
"pins": {
+ "nixos-24.05": {
+ "type": "Channel",
+ "name": "nixos-24.05",
+ "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.803.b3b2b28c1daa/nixexprs.tar.xz",
+ "hash": "186cvfziz5kd7qknw4fb9z2b2fpqi9gbsyw3gky7hmj0bzdan64b"
+ },
"nixpkgs": {
"type": "Channel",
"name": "nixpkgs-unstable",