From caa9928be91b96bdcd3a6189ae387d60a2828384 Mon Sep 17 00:00:00 2001 From: Lucille Hua Date: Wed, 21 Jun 2023 18:39:52 -0700 Subject: [PATCH] Update installer action to match the latest cli behavior --- .github/workflows/test.yaml | 11 +++++++---- action.yml | 3 ++- testdata/devbox.json | 7 ++----- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 44057d2..9d5088c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,6 +8,8 @@ concurrency: on: pull_request: push: + branches: + - main paths-ignore: - '**.md' @@ -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: @@ -56,7 +58,7 @@ jobs: uses: ./ with: devbox-version: 0.5.5 - refresh-cli: 'true' + refresh-cli: true project-path: 'testdata' sha256-checksum: 'd5e623c032d38250346301040d51bcdca8e6db051c3688cc452e0dda5d95a070' @@ -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 @@ -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' diff --git a/action.yml b/action.yml index 2861618..59f423d 100644 --- a/action.yml +++ b/action.yml @@ -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)" @@ -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 diff --git a/testdata/devbox.json b/testdata/devbox.json index f3e7483..b9c88a3 100644 --- a/testdata/devbox.json +++ b/testdata/devbox.json @@ -1,11 +1,8 @@ { "packages": [ - "go" + "go@latest" ], "shell": { "init_hook": null - }, - "nixpkgs": { - "commit": "52e3e80afff4b16ccb7c52e9f0f5220552f03d04" } -} +} \ No newline at end of file