Skip to content

Commit ec022a1

Browse files
committed
fix: nix run
1 parent 53b5f3f commit ec022a1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/testinfra-nix.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set PostgreSQL versions
1919
id: set-versions
2020
run: |
21-
VERSIONS=$(yq '.postgres_major[]' ansible/vars.yml | jq -R -s -c 'split("\n")[:-1]')
21+
VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]')
2222
echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT
2323
2424
test-ami-nix:
@@ -62,13 +62,10 @@ jobs:
6262
- name: Set PostgreSQL version environment variable
6363
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.postgres_version }}" >> $GITHUB_ENV
6464

65-
- name: Install yq & jq
66-
run: |
67-
nix profile install nixpkgs#yq nixpkgs#jq
6865

6966
- name: Generate common-nix.vars.pkr.hcl
7067
run: |
71-
PG_VERSION=$(yq '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
68+
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
7269
PG_VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
7370
echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl
7471
# Ensure there's a newline at the end of the file

0 commit comments

Comments
 (0)