Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installer action to match the latest cli behavior #8

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ concurrency:
on:
pull_request:
push:
branches:
- main
paths-ignore:
- '**.md'

Expand Down Expand Up @@ -35,7 +37,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 +58,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 +72,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 +87,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"
}
}
}