micronaut-projects / micronaut-projects/github-actions
GitHub Action Job can fail because of SUDO commands, in case Runners don't have SUDOER privilege
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
In the case of self-hosted GitHub Actions runners, it may occur that SUDO commands are not made available for security reasons.
The graalvm/pre-build action uses 3 SUDO commands historically to mitigate storage issues (see: https://github.com/actions/virtual-environments/issues/709).
One could solve this small issue by ensuring the commands do not fail even in the case the SUDO commands are not available:
```
sudo -n apt-get clean || true
```
-n: would ensure no interactive prompt is requested (to pass the user password)
Thanks
ps: I'll provide a PR to address that one soon
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the graalvm/pre-build action definitions and locate the three historical SUDO commands described in the issue. Confirm the workflow remains non-interactive and succeeds when the self-hosted runner lacks sudo access; done means all affected commands tolerate unavailable sudo without masking unrelated failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100