Skip to content

Commit

Permalink
fix: use devbox from ~/.local/bin (#50)
Browse files Browse the repository at this point in the history
Addresses #49
The `runner` user on self hosted runners does not have access to
`/usr/local/bin` path. This result in cache restore failures at
`/usr/local/bin`.
We can install devbox at user's home directory and make it accessible to
subsequent actions.
  • Loading branch information
supershal committed May 20, 2024
1 parent df43d8d commit 88775c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,15 @@ runs:
exit 3
fi
fi
sudo mv "$DEVBOX_BINARY" /usr/local/bin/devbox
mkdir -p ~/.local/bin
mv "$DEVBOX_BINARY" ~/.local/bin/devbox
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Save devbox cli cache
if: inputs.refresh-cli == 'false' && steps.cache-devbox-cli.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: /usr/local/bin/devbox
path: ~/.local/bin/devbox
key: ${{ runner.os }}-${{ runner.arch }}-devbox-cli-${{ env.latest_version }}

- name: Workaround nix store cache permission issue
Expand Down

0 comments on commit 88775c2

Please sign in to comment.