-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area/runnerRelating to errors in the runnerRelating to errors in the runnerkind/questionFurther information is requestedFurther information is requestedmeta/workaroundA workaround has been identified.A workaround has been identified.stale-exemptExempt from staleExempt from stale
Description
Hi,
as documented here GitHub configures passwordless sudo, so I can have sudo in my shell scripts to perform individual commands as root.
Given this minimal workflow:
on: push
name: Test
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo id
The result on Actions is uid=0(root) gid=0(root) groups=0(root)
Running this workflow in act
yields this result:
$ act
[Test/build] 🚀 Start image=node:12.6-buster-slim
[Test/build] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Test/build] 🐳 docker cp src=/Users/fwilhe/temp/test-actions/. dst=/github/workspace
[Test/build] ⭐ Run sudo id
| /github/workflow/0: line 2: sudo: command not found
[Test/build] ❌ Failure - sudo id
Error: exit with `FAILURE`: 127
Not sure what the most elegant solution would be without re-building the node:12.6-buster-slim
image to install sudo and configure it passwordless. But I think the goal should be to be 1:1 compatible with actions, if possible.
tyeth, ChristianFenn, OJFord, ceroloy, hadrienj and 29 morehata6502, HiImJulien, iddan, carlthome, mbuffa and 10 more
Metadata
Metadata
Assignees
Labels
area/runnerRelating to errors in the runnerRelating to errors in the runnerkind/questionFurther information is requestedFurther information is requestedmeta/workaroundA workaround has been identified.A workaround has been identified.stale-exemptExempt from staleExempt from stale