Create docker action using existing image

Hi

When creating a docker action, in the action.yml i need to set

runs:
using: ‘docker’
image: ‘Dockerfile’

This builds the image from a given dockerfile in my repo

Is there any way to run a docker action pulling an existing image instead of building it from the dockerfile?

Thanks

Example from the docs:

runs:
  using: 'docker'
  image: 'docker://debian:stretch-slim'

Thanks!

If i want to set the image tag depending on the branch or the tag for the action, would be possible?

It is, if i run action@main, it should run run docker://debian:main. If i run action@0.1.0 it runs the image with the tag 0.1.0

Thanks

Not that I’m aware of. Most people would expect an action at a specific commit to use a specific, fixed version of the image.

1 Like