-
Lets say I have the following within a workflow:
where Is there currently anyway around this without separating steps at a higher level? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Two actions “owner/action1@v2” and “owner/action2@master”.
In this way, the source code of the action will be downloaded via the checkout action. If the the action is docker action, the docker build will be executed in the step when running the action, it will not do the docker build before this step. In your case, you also can set the matrix like this:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply and suggestion. Modifying the Having a more ‘intelligent’ download and build phase based on |
Beta Was this translation helpful? Give feedback.
-
Yes, you’re right. In your case, when the runner does not require the Docker action, the main thing you need to do is avoiding downloading and building the Docker action so that avoiding the error caused by the docker build. For the JavaScript and Composite actions, they generally do not need to build before execute the actions. Normally it will not have much effect to download the source files of the actions, even if the runner may do not require the actions. Alternatively, I have another workaround for your case that you do not need to change the configurations of the matrix. It uses the if statements to skip downloading, building and executing the Docker action.
|
Beta Was this translation helpful? Give feedback.
-
@brightran Ok, I see - that could potentially work nicely, will try it out. Thanks again for the help. |
Beta Was this translation helpful? Give feedback.
@rhodrin,
Yes, you’re right.
When a runner requires multiple specific actions, this workaround indeed is not good enough.
In your case, when the runner does not require the Docker action, the main thing you need to do is avoiding downloading and building the Docker action so that avoiding the error caused by the docker build.
For the JavaScript and Composite actions, they generally do not need to build before execute the actions. Normally it will not have much effect to download the source files of the actions, even if the runner…