Using Dockerfile from different repo as container

Is there a way to use a Dockerfile from a different repository as the image for an action i’m running? Let’s say I have 2 repos - me/app and me/dockerfiles - both are private. I can access the 2nd repo using a token, but I’m assuming i’d need to do this in 2 steps and then perist the data between them (as artefacts maybe)

I want to do something like this:

name: Test
name: Setup
runs-on: ubuntu-latest

 - name: Checkout dockerfiles
uses: actions/checkout@master
repository: me/dockerfiles
token: ${{ secrets.GITHUB_ACTIONS_ACCESS_TOKEN }}

name: Test
runs-on: ubuntu-latest
 image: '/home/runner/work/me/dockerfiles/versionx/Dockerfile'

At the moment the data isn’t persisted anyway, but i’m not sure it’s possible to make it available before it’s needed since the step to download would need to be after the step where the image is declared.

Is this possible?

When use **jobs.<job_id>.container.image **The value can be the Docker Hub image name or a public docker registry name.  Using Dockerfile from different repo as container is not supported. 

You could build your dockerfile and then push the image to Docker Hub .  

Or you could consider to create a docker container action, what I need to prompt is that When an action is in a private repository, the action can only be used in workflows in the same repository. Public actions can be used by workflows in any repository.