actions / container-action

MIT License
185 stars 41 forks source link

Add documentation to detail docker run command #3

Closed AngelOnFira closed 10 months ago

AngelOnFira commented 4 years ago

It is not documented how the run command is used when a Github Action is executed.

In my particular use case, I wanted to figure out how to get files off a container Action. The answer is to send any output files to /github/workspace. It would be helpful to see that somewhere in the documentation.

Having some more information about the rest of the commands would be useful as well I think.

/usr/bin/docker run
    --name <hash> \
    --label <hash> \
    --workdir /github/workspace \
    --rm \
    -e HOME \
    -e GITHUB_REF \
    -e GITHUB_SHA \
    -e GITHUB_REPOSITORY \
    -e GITHUB_ACTOR \
    -e GITHUB_WORKFLOW \
    -e GITHUB_HEAD_REF \
    -e GITHUB_BASE_REF \
    -e GITHUB_EVENT_NAME \
    -e GITHUB_WORKSPACE \
    -e GITHUB_ACTION \
    -e GITHUB_EVENT_PATH \
    -e RUNNER_OS \
    -e RUNNER_TOOL_CACHE \
    -e RUNNER_TEMP \
    -e RUNNER_WORKSPACE \
    -v "/var/run/docker.sock":"/var/run/docker.sock" \
    -v "/home/runner/work/_temp/_github_home":"/github/home" \
    -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" \
    -v "/home/runner/work/sauce/sauce":"/github/workspace" \
    <hash>
ncalteen commented 10 months ago

Hello! Apologies for the delay in responding to your issue. I've tracked down a few documentation sources that may be helpful.

ncalteen commented 10 months ago

Hello again! This has been added to the documentation here: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action#accessing-files-created-by-a-container-action

I'll close this out for now, but if you have other questions please feel free to comment and reopen!