-
I would l like to be able to reuse the Docker image that I built in a step in the upcoming ones. I want to avoid pushing that image to a registry. I have not been able to find out how to do that. I attached part of my action.
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
KhimairaCrypto:
Do you mean steps or jobs? The image should be available in subsequent steps of the same job, e.g. Using the image in another job won’t work without pushing to a registry. GitHub-hosted runner VMs are discarded after their job is complete, and if you use self-hosted runners the next job might be assigned to another one. |
Beta Was this translation helpful? Give feedback.
-
Hi @airtower-luna, At this stage, I am pretty open to either steps or jobs. In my .yml file, I am listing the docker images at the step and the job level. The result is the same in both scenarios, and I can not see the new image `*/myimage: latest. The goal is to build my custom/disposable image and be able to use it across all the different jobs. But based on your last comment, my only option is to do as much as possible at the step level. here is the result of
|
Beta Was this translation helpful? Give feedback.
-
Most of those images look like they’re the ones cached on Actions runners. Without more details about your workflow (full job and its output) I don’t think it’s possible to say what may be going wrong, I can only say it works in my workflows. I use Docker commands directly though, without |
Beta Was this translation helpful? Give feedback.
-
Please let me know what additional details would you like to know!. What logs do you want to see?. I list the images on as you can see the fresh new image is not there. The docker part of the workflow Is all there. You mentioned that you are not using BuildX. I can need to use buildX in order to be able to pass a secret. Without Adding BuildX that is not possible.
here is the sample Dockefile that I use for testing purposes:
|
Beta Was this translation helpful? Give feedback.
-
I refactored my workflow to use
|
Beta Was this translation helpful? Give feedback.
-
I managed to save my docker image, by saving it as an artifact :-). This will allow me to use it in the following steps :-).
|
Beta Was this translation helpful? Give feedback.
I managed to save my docker image, by saving it as an artifact :-). This will allow me to use it in the following steps :-).