Skip to content

Commit

Permalink
Update installer action to match the latest cli behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
LucilleH committed Jun 22, 2023
1 parent 9707b9f commit 249d659
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install devbox
uses: ./
with:
devbox-version: 0.4.4
devbox-version: 0.5.5
project-path: 'testdata'

test-action-with-cache:
Expand All @@ -56,7 +56,7 @@ jobs:
uses: ./
with:
devbox-version: 0.5.5
refresh-cli: 'true'
refresh-cli: true
project-path: 'testdata'
sha256-checksum: 'd5e623c032d38250346301040d51bcdca8e6db051c3688cc452e0dda5d95a070'

Expand All @@ -70,7 +70,7 @@ jobs:
continue-on-error: true
with:
devbox-version: 0.5.5
refresh-cli: 'true'
refresh-cli: true
sha256-checksum: 'bad-sha'
project-path: 'testdata'
- name: Fail on success
Expand All @@ -85,6 +85,7 @@ jobs:
uses: ./
with:
devbox-version: 0.5.5
refresh-cli: 'true'
enable-cache: true
refresh-cli: true
sha256-checksum: '3c2ce11638e3ffcd55881ec20143c38feeb24069ccdb5edf82b343c168aaca32'
project-path: 'testdata'
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
using: "composite"
steps:
- name: Workaround for permission issue
if: inputs.enable-cache == 'true'
if: inputs.enable-cache == 'true' && runner.os == 'macOS'
shell: bash
run: sudo chmod u+s "$(command -v tar)"

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

- name: Get devbox version
Expand Down
7 changes: 2 additions & 5 deletions testdata/devbox.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"packages": [
"go"
"go@latest"
],
"shell": {
"init_hook": null
},
"nixpkgs": {
"commit": "52e3e80afff4b16ccb7c52e9f0f5220552f03d04"
}
}
}

0 comments on commit 249d659

Please sign in to comment.