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.
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:
The result on Actions is
uid=0(root) gid=0(root) groups=0(root)Running this workflow in
actyields this result:Not sure what the most elegant solution would be without re-building the
node:12.6-buster-slimimage to install sudo and configure it passwordless. But I think the goal should be to be 1:1 compatible with actions, if possible.