Skip to content

Commit e190e7b

Browse files
authored
Update installer action to match the latest cli behavior (#8)
## Summary - Update test version to 0.5.5 - Update macos test to use cache for speed - Add new nix installation location for caching, where this logic was introduced in https://github.com/NixOS/nix/pull/5588/files and it uses XDG directory
1 parent 9707b9f commit e190e7b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/workflows/test.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ concurrency:
88
on:
99
pull_request:
1010
push:
11+
branches:
12+
- main
1113
paths-ignore:
1214
- '**.md'
1315

@@ -35,7 +37,7 @@ jobs:
3537
- name: Install devbox
3638
uses: ./
3739
with:
38-
devbox-version: 0.4.4
40+
devbox-version: 0.5.5
3941
project-path: 'testdata'
4042

4143
test-action-with-cache:
@@ -56,7 +58,7 @@ jobs:
5658
uses: ./
5759
with:
5860
devbox-version: 0.5.5
59-
refresh-cli: 'true'
61+
refresh-cli: true
6062
project-path: 'testdata'
6163
sha256-checksum: 'd5e623c032d38250346301040d51bcdca8e6db051c3688cc452e0dda5d95a070'
6264

@@ -70,7 +72,7 @@ jobs:
7072
continue-on-error: true
7173
with:
7274
devbox-version: 0.5.5
73-
refresh-cli: 'true'
75+
refresh-cli: true
7476
sha256-checksum: 'bad-sha'
7577
project-path: 'testdata'
7678
- name: Fail on success
@@ -85,6 +87,7 @@ jobs:
8587
uses: ./
8688
with:
8789
devbox-version: 0.5.5
88-
refresh-cli: 'true'
90+
enable-cache: true
91+
refresh-cli: true
8992
sha256-checksum: '3c2ce11638e3ffcd55881ec20143c38feeb24069ccdb5edf82b343c168aaca32'
9093
project-path: 'testdata'

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ runs:
2424
using: "composite"
2525
steps:
2626
- name: Workaround for permission issue
27-
if: inputs.enable-cache == 'true'
27+
if: inputs.enable-cache == 'true' && runner.os != 'macOS'
2828
shell: bash
2929
run: sudo chmod u+s "$(command -v tar)"
3030

@@ -37,6 +37,7 @@ runs:
3737
~/.nix-profile
3838
/nix/store
3939
/nix/var/nix
40+
~/.local/state/nix
4041
key: ${{ runner.os }}-devbox-${{ hashFiles(format('{0}/devbox.json', inputs.project-path)) }}
4142

4243
- name: Get devbox version

testdata/devbox.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"packages": [
3-
"go"
3+
"go@latest"
44
],
55
"shell": {
66
"init_hook": null
7-
},
8-
"nixpkgs": {
9-
"commit": "52e3e80afff4b16ccb7c52e9f0f5220552f03d04"
107
}
11-
}
8+
}

0 commit comments

Comments
 (0)