Args not being passed to action hosted as container on dockerhub #25084
-
I created an action using Python which meant running it as a Docker container and has one required input. Referencing the Dockerfile locally worked fine in the workflow, although the [16 second build overhead](http://(https://github.com/microsoft/pvscbot/commit/a1297060c82cc8638c7134745e24961c227126c4/checks?check_suite_id=387301721) was unfortunate. I decided to see if pushing the container to dockerhub would help by skipping the build step and thus lower the time it took to execute, but now the action says there’s no argument being passed in anymore for the input and thus is erroring out. (I even ran it again referencing the action locally and it succeeded.) What am I missing to make calling a container hosted on dockerhub work with an input? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It’s not supported to set self-defined ‘repo-token’ in ‘jobs.<job_id>.steps.with’ for docker image. With docker image while not action in ‘uses’, workflow will pull the docker image from public docker hub. According to the syntax doc, you can use ‘jobs.<job_id>.steps.with.args’ to pass a command to execute your script, but however cannot set input for the docker image. Code sample as below:
|
Beta Was this translation helpful? Give feedback.
-
Thanks! That does indeed solve my immediate problem. It is rather unfortunate, though, that it can’t use the |
Beta Was this translation helpful? Give feedback.
It’s not supported to set self-defined ‘repo-token’ in ‘jobs.<job_id>.steps.with’ for docker image.
With docker image while not action in ‘uses’, workflow will pull the docker image from public docker hub. According to the syntax doc, you can use ‘jobs.<job_id>.steps.with.args’ to pass a command to execute your script, but however cannot set input for the docker image.
Code sample as below: