gonuit / heroku-docker-deploy

Build, Push and Release a Docker container to Heroku.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non root case for dockerfile_directory not working

psolymos opened this issue Β· comments

Thanks for this simple and intuitive action!

It works perfectly when the Dockerfile is in the root of the repository (dockerfile_directory: ./).
However, I had no luck modifying this setting to a folder. It looks like the script runs cd <dockerfile_directory> before docker build ..., but none of my tries worked.

Do you have an example that works, or is this a bug?

Thanks!

Update: tried some tweaks in my fork, but I still see the same error when changing the dockerfile_directory: ./ to e.g. dockerfile_directory: appdir:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/runner/work/heroku-app/heroku-app/Dockerfile: no such file or directory

Which is a clear indication that something is wrong with cd appdir. Could it be that the async event is not finished before the docker build command?

I made some minor changes, updated @actions/core to 1.2.6, fixed typos but none of those fixed the issue. Let me know if you need a PR.

As a workaround for anyone running into this until it is fixed: add this step to your yaml

      - name: Copy
        run: cp -R appdir/* .

Hi @psolymos,

Sorry for the late reply. Interesting πŸ€”. I will take a look at this and will back to you with more information soon.

Stay tuned πŸ’ͺ🏻

Hi @psolymos πŸ‘‹πŸ»

Thank you for opening this issue. Previously this argument was working for me, so I did not think about it as long as I should (now I see, that it was probably working due to some other bug - possibly related to the node.js distribution I was using at the time).

The issue should be resolved by #4.
A new action version is available in the marketplace under the version: v1.3.0.

Let me know if it works for you, if no, feel free to reopen this issue.

Have a nice day/night! πŸ˜ƒ

Great thanks!