Skip to content

Commit 8f50804

Browse files
committed
chore: running nix in the right context
1 parent 7a6f599 commit 8f50804

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Generate common-nix.vars.pkr.hcl
5151
run: |
52-
PG_VERSION=$(nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
52+
PG_VERSION=$(sudo nix run nixpkgs#yq -- '.postgres_release["postgres'${{ matrix.postgres_version }}'"]' ansible/vars.yml)
5353
PG_VERSION=$(echo $PG_VERSION | tr -d '"') # Remove any surrounding quotes
5454
echo 'postgres-version = "'$PG_VERSION'"' > common-nix.vars.pkr.hcl
5555
# Ensure there's a newline at the end of the file
@@ -62,7 +62,7 @@ jobs:
6262
- name: Generate args
6363
id: args
6464
run: |
65-
ARGS=$(nix run nixpkgs#yq -- 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' ansible/vars.yml)
65+
ARGS=$(sudo nix run nixpkgs#yq -- 'to_entries | map(select(.value|type == "!!str")) | map(.key + "=" + .value) | join("\n")' ansible/vars.yml)
6666
echo "result<<EOF" >> $GITHUB_OUTPUT
6767
echo "$ARGS" >> $GITHUB_OUTPUT
6868
echo "EOF" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)