Skip to content

Commit 030d3c8

Browse files
committed
chore: source nushell from nix
1 parent 4168531 commit 030d3c8

File tree

1 file changed

+10
-24
lines changed

1 file changed

+10
-24
lines changed

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ jobs:
1818
steps:
1919
- name: Checkout Repo
2020
uses: actions/checkout@v3
21-
22-
- name: Install Nushell
23-
run: |
24-
sudo snap install nushell --classic
25-
2621
- name: Generate build matrix
22+
uses: DeterminateSystems/nix-installer-action@main
2723
id: set-matrix
2824
run: |
29-
nu -c 'let versions = (open ansible/vars.yml | get postgres_major)
25+
nix run nixpkgs#nushell -- -c 'let versions = (open ansible/vars.yml | get postgres_major)
3026
let matrix = ($versions | each { |ver|
3127
let version = ($ver | str trim)
3228
let dockerfile = $"Dockerfile-($version)"
@@ -54,17 +50,13 @@ jobs:
5450
build_args: ${{ steps.args.outputs.result }}
5551
steps:
5652
- uses: actions/checkout@v3
57-
58-
- name: Install Nushell
59-
run: |
60-
sudo snap install nushell --classic
61-
53+
- uses: DeterminateSystems/nix-installer-action@main
6254
- name: Set PostgreSQL version environment variable
6355
run: echo "POSTGRES_MAJOR_VERSION=${{ matrix.version }}" >> $GITHUB_ENV
6456

6557
- id: args
6658
run: |
67-
nu -c '
59+
nix run nixpkgs#nushell -- -c '
6860
open ansible/vars.yml
6961
| items { |key value| {name: $key, item: $value} }
7062
| where { |it| ($it.item | describe) == "string" }
@@ -82,9 +74,7 @@ jobs:
8274
timeout-minutes: 180
8375
steps:
8476
- uses: actions/checkout@v3
85-
- name: Install Nushell
86-
run: |
87-
sudo snap install nushell --classic
77+
- uses: DeterminateSystems/nix-installer-action@main
8878
- run: docker context create builders
8979
- uses: docker/setup-buildx-action@v3
9080
with:
@@ -96,7 +86,7 @@ jobs:
9686
- name: Get image tag
9787
id: image
9888
run: |
99-
nu -c '
89+
nix run nixpkgs#nushell -- -c '
10090
let version = "${{ matrix.postgres.version }}"
10191
let release_key = if ($version | str contains "orioledb") {
10292
$"postgresorioledb-17"
@@ -126,17 +116,15 @@ jobs:
126116
runs-on: ubuntu-latest
127117
steps:
128118
- uses: actions/checkout@v3
129-
- name: Install Nushell
130-
run: |
131-
sudo snap install nushell --classic
119+
- uses: DeterminateSystems/nix-installer-action@main
132120
- uses: docker/setup-buildx-action@v3
133121
- uses: docker/login-action@v2
134122
with:
135123
username: ${{ secrets.DOCKER_USERNAME }}
136124
password: ${{ secrets.DOCKER_PASSWORD }}
137125
- name: Get image tag
138126
run: |
139-
nu -c '
127+
nix run nixpkgs#nushell -- -c '
140128
let version = "${{ matrix.version }}"
141129
let release_key = if ($version | str contains "orioledb") {
142130
$"postgres($version | str replace "-" "")"
@@ -162,13 +150,11 @@ jobs:
162150
matrix: ${{ steps.get_versions.outputs.matrix }}
163151
steps:
164152
- uses: actions/checkout@v3
165-
- name: Install Nushell
166-
run: |
167-
sudo snap install nushell --classic
153+
- uses: DeterminateSystems/nix-installer-action@main
168154
- name: Get version
169155
id: get_versions
170156
run: |
171-
nu -c '
157+
nix run nixpkgs#nushell -- -c '
172158
let version = "${{ matrix.version }}"
173159
let release_key = if ($version | str contains "orioledb") {
174160
$"postgres($version | str replace "-" "")"

0 commit comments

Comments
 (0)