-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Add support for executing custom user data #14
Conversation
action.yml
Outdated
echo "Running custom user data" | ||
echo "${{ inputs.custom_user_data }}" | tee /tmp/custom_user_data.sh | ||
chmod +x /tmp/custom_user_data.sh | ||
sudo /tmp/custom_user_data.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo
changes user to root
is that intentional?
E.g. if I want to run pip install --user foobar
it will be installed in /root
instead of current user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sthaha @vprashar2929 userdata/cloud-init is run as the root user. sudo
can be removed.
9cdbb30
to
24b29c9
Compare
24b29c9
to
e447d69
Compare
This commit introduces the ability to run a custom script prior to installing and starting the runner service. Users can now pass custom script (runs as sudo) to configure their runners with specific requirements before the runner is fully initialized. A new input parameter `custom_script` has been added. It accepts a string value representing the custom script. If this parameter is provided, the script will be executed before the runner service starts, allowing for custom configurations or setup tasks to be performed seamlessly. Signed-off-by: Vibhu Prashar <vibhu.sharma2929@gmail.com>
e447d69
to
49df56d
Compare
@vprashar2929 Thanks for the quick turn-around. Could you also update the README.md Inputs and example with the new parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update README.md and remove the sudo
This commit introduces the ability to run a custom script prior to installing and starting the runner service. Users can now pass custom script (runs as sudo) to configure their runners with specific requirements before the runner is fully initialized.
A new input parameter
custom_script
has been added. It accepts a string value representing the custom script. If this parameter is provided, the script will be executed before the runner service starts, allowing for custom configurations or setup tasks to be performed seamlessly.Address: #13