Skip to content

command not found (in image node:12.6-buster-slim, as opposed to GH Actions) #107

Open
@fwilhe

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.

Metadata

Assignees

No one assigned

    Labels

    area/runnerRelating to errors in the runnerkind/questionFurther information is requestedmeta/workaroundA workaround has been identified.stale-exemptExempt from stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions