Hi @pguyot . Thank you for your awesome work on this github action.
For my use-case, I am trying to install the latest release of Raspberry Pi OS lite and download one of my repos from Github. So far, this action is doing it's work pretty well. Just a short info, the URL to the latest version of Raspberry Pi OS has changed. Maybe this could be updated?
For the next step, I am trying to create a new user, navigate to the home directory of the new user and clone the repo.
First I tried the user parameter, but this did not work:
Warning: Unexpected input(s) 'user', valid inputs are ['base_image', 'image_additional_mb', 'bind_mount_repository', 'cpu', 'cpu_info', 'commands', 'copy_artifact_path', 'copy_artifact_dest', 'copy_repository_path', 'optimize_image', 'use_systemd_nspawn', 'systemd_nspawn_options', 'bootpartition', 'rootpartition', 'shell', 'shell_package', 'exit_on_fail', 'debug', 'import_github_env', 'export_github_env']
I then tried to add a user with the useradd command, like this:
sudo useradd -p my-super-secure-password test
This works, but I cannot cd into the working directory of the user test
:
warning: cannot change directory to /home/test: No such file or directory
I am testing the same setup on the same OS with an Raspberry Pi Zero W. But this seems to work fine. How can I navigate to the user "test's" home directory to clone a repo?
This is the full section of the code:
- name: run-tests-on-arm
uses: pguyot/arm-runner-action@v2
with:
# Set the base_image to the desired Raspberry Pi OS version
base_image: https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz
image_additional_mb: 1500 # enlarge free space to 1.5 GB
optimize_image: true
user: test
commands: |
echo $PWD && ls
sudo useradd -p my-super-secure-password test
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi test
su - test
cd /home/test