Docker action uses build instead of pull #25175
-
I’ve recently created a GitHub Action using docker: https://github.com/vidavidorra/github-action-renovate |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @jdbruijn , I checked wagoid/commitlint-github-action. In its action.yml , the author specific a docker image in dockerhub under runs key. When using this action in a workflow, it will pull the image from dockerhub.
And in your action.yml , you are using Dockerfile. When using this action in a workflow, it will build the image using the Dockerfile.
If you want to pull image instead of build when using your Docker action , I would recommend you push the image into Dockerhub and then modify your action.yml > runs > image using an image instead of Dockerfile. |
Beta Was this translation helpful? Give feedback.
-
I see, thanks for the explanation! I’ll have a look then whether I want to setup Docker build and push in my workflow. Would make it a bit more complex since I’d have to build that before I can test the action, and then also would have to update my action.yml based on that build. And I want to do all that automatically in my workflow :slight_smile: Anyways, I’ll have to look into all that further. Thanks for the answer! |
Beta Was this translation helpful? Give feedback.
Hi @jdbruijn ,
I checked wagoid/commitlint-github-action. In its action.yml , the author specific a docker image in dockerhub under runs key. When using this action in a workflow, it will pull the image from dockerhub.
And in your action.yml , you are using Dockerfile. When using this action in a workflow, it will build the image using the Dockerfile.
If you want to pull image instead of build when using your Docker action , I would recommend you push the image into Dockerhub and then modify your action.yml > runs > image using an image instead of Docker…