-
Notifications
You must be signed in to change notification settings - Fork 337
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
Parameterise execution of runner #122
base: main
Are you sure you want to change the base?
Parameterise execution of runner #122
Conversation
@kpturner thanks for your PR. I've added your fork to https://github.com/esteve/autoware_packages/blob/main/.github/workflows/generate-debs-aws.yml#L21 but I can't seem to get the CI workflow to run as the |
Forgot to link to a CI run (https://pipelines.actions.githubusercontent.com/serviceHosts/0571ff26-7fc8-4c97-8abd-f4480660739f/_apis/pipelines/1/runs/50/signedlogcontent/9?urlExpires=2023-05-03T11%3A18%3A46.7515461Z&urlSigningMethod=HMACV1&urlSignature=ff1ZpjWGpqtpPIOMonwu7zpYjPok%2BVFiRIzjtMTUG94%3D). I added a bunch of commands ( |
Never mind, I just realized that your PR doesn't have an up to date Is there a way to fix this? Thanks. |
]; | ||
} | ||
if (config.input.runAsUser) { | ||
userData.push(`chown -R ${config.input.runAsUser} ${config.input.runnerHomeDir}`); |
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.
Found the issue that made it not work in my case. If runner-home-dir
is empty (i.e. we let the action download the runner code), but we set run-as-user
, this won't work because chown
expects two arguments. I fixed it by replacing ${config.input.runnerHomeDir}
with .
, which works because the current directory is already set earlier in cd "${config.input.runnerHomeDir}"
or mkdir actions-runner && cd actions-runner
@kpturner I've committed the fix I mentioned in #122 (comment) in my fork (https://github.com/esteve/ec2-github-runner/tree/Optionally-execute-runner-as-a-service). I've also rebased your changes on top of |
any update on this? we need this for run as non-root. thanks |
Hi, |
@Flyingliuhub @alonbl I've been updating this PR on top of main in #152 , which also contains a couple of fixes. We've been using these change at the Autoware Foundation for a while (see https://github.com/autowarefoundation/autoware-deb-packages) |
No description provided.