actions / container-action Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hello,
When I try to run a container action or to create my own and invoke a container, it fails saying that it is only supported on Linux agents.
Any ideas when windows will be supported?
I can run docker run
just fine from a Windows agent...
Thank you!
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>
Can it be made possible to specify user and group to be used in the docker run command?
Such as using an options
command?
name: 'Container Action Template'
description: 'Get started with Container actions'
author: 'GitHub'
inputs:
myInput:
description: 'Input to use'
default: 'world'
runs:
using: 'docker'
image: 'Dockerfile'
options: --user 1000:1000
args:
- ${{ inputs.myInput }}
My use case is as follows: We have a container where we specify the user (uid=1000,gid=1000) and one of the workflow steps we wish for is to start the container up and send some args to it. If it's successful, we know the PR hasn't broken it.
However when using container-action github is starting the container and mounting workspace, workflow, home etc as uid=1001 and gid=121 and therefore our user (who is non-root) cannot then perform actions in a script.
Thanks,
Matt
This repository is missing a CodeQL analysis workflow (see typescript-action as an example
Hi,
Is it possible to pass environment variables to the docker build
command?
I have some variables like CUDA version, library xyz version, ... and would like to access it during the docker build
step. With the env
or args
options, I can access it during the run
step, but not while the image is being built.
Installing the whole thing in docker run
does not make a big difference on the result, but I'd like to leverage docker cache
I want to setup a CPU emulation action for Docker, however I can't currently do that due to the lack of access to this flag.
๐ This issue is to track the move over to using main
as the default branch for this repo. Weโd love your team's help in completing this transition.
Do not remove your old default branch, customers are going to be using it. We will be sending messages out about these changes, but if you want to message in your repository, that's fine as well.
main
branch.main
.We are aiming to complete this work by August 28th.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.