Using inputs when specifying Dockerfile name in the custom Docker action #26939
-
Is it possible to use inputs when specifying the image name in the custom Docker action? Something like:
I’ve read that it’s not possible to use them in the uses part: https://github.community/t5/GitHub-Actions/Expressions-in-Docker-URI/m-p/34067#M1778 But this is using them in the image name part. That way I could have multiple Dockerfiles in my repo, for instance for different PHP and Node.js versions, so that I don’t need to create N number of repos for my custom actions. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi @dingo-d , Currently it’s not supported to use inputs to specify docker image name. As an alternative, in your action repository, you can create some subfolders to store your different actions. structure as below:
And specify folder name of your action in workflow yaml file. Thanks. |
Beta Was this translation helpful? Give feedback.
-
EDIT: Oh in my custom actions I can create multiple directories to store different dockers and then when I call my action those will be executed automatically! Will try that, thanks! |
Beta Was this translation helpful? Give feedback.
-
How do I specify the folder of the action in my workflow file? |
Beta Was this translation helpful? Give feedback.
-
Hi @dingo-d , In the workflow file, you need to add folder after your repo, for my action:
My workflow here: https://github.com/weide-zhou/ticket13/runs/695896509?check_suite_focus=true Thanks. |
Beta Was this translation helpful? Give feedback.
-
That di the trick! Thanks! |
Beta Was this translation helpful? Give feedback.
Hi @dingo-d ,
In the workflow file, you need to add folder after your repo, for my action:
My workflow here: https://github.com/weide-zhou/ticket13/runs/695896509?check_suite_focus=true
Thanks.