diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index 0ba562d0..62390f6e 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -583,7 +583,7 @@ func (cr *containerReference) tryReadID(opt string, cbk func(id int)) common.Exe } exp := regexp.MustCompile(`\d+\n`) found := exp.FindString(sid) - id, err := strconv.ParseInt(found[:len(found)-1], 10, 32) + id, err := strconv.ParseInt(strings.TrimSpace(found), 10, 32) if err != nil { return nil } diff --git a/pkg/runner/testdata/remote-action-js-node-user/push.yml b/pkg/runner/testdata/remote-action-js-node-user/push.yml index cede7b0a..8bf45da4 100644 --- a/pkg/runner/testdata/remote-action-js-node-user/push.yml +++ b/pkg/runner/testdata/remote-action-js-node-user/push.yml @@ -8,6 +8,21 @@ jobs: image: node:16-buster-slim options: --user node steps: + - name: check permissions of env files + id: test + run: | + echo "USER: $(id -un) expected: node" + [[ "$(id -un)" = "node" ]] + echo "TEST=Value" >> $GITHUB_OUTPUT + shell: bash + + - name: check if file command worked + if: steps.test.outputs.test != 'Value' + run: | + echo "steps.test.outputs.test=${{ steps.test.outputs.test || 'missing value!' }}" + exit 1 + shell: bash + - uses: actions/hello-world-javascript-action@v1 with: who-to-greet: 'Mona the Octocat'