Open Kakcalu13 opened 10 months ago
This should work except the .
in front of Dockerfile
dockerfile: Dockerfile
context: ./tmp/playground
Build process will set the context first and will look for the Dockerfile
Thanks @RafikFarhad!
Testing it now
Unfortunately, that did not work. Sounds like it couldn't run the dockerfile anywhere, it has to be inside the current directory. See here:
I added one job before push to gcr.
Then the next job (which is the same one as above plus your change/suggestion:
See the snippet of yml:
- name: debugging playground
working-directory: /tmp/playground
run: |
pwd
echo "ls playground"
ls
- name: Push to GCR GitHub Action
uses: RafikFarhad/push-to-gcr-github-action@v4.1
with:
gcloud_service_key: ${{ secrets.GCR_SERVICE }}
project_id: feagi-poc
image_name: feagi-dev/playground
image_tag: ${{ github.run_number }}, latest
dockerfile: Dockerfile
context: ./tmp/playground
Honestly, I don't see anything wrong with your suggestion. If you have more ideas, I'd love to hear them since I've hit the block now :(
See the snippet of yml:
- name: debugging playground working-directory: /tmp/playground run: | pwd echo "ls playground" ls - name: Push to GCR GitHub Action uses: RafikFarhad/push-to-gcr-github-action@v4.1 with: gcloud_service_key: ${{ secrets.GCR_SERVICE }} project_id: feagi-poc image_name: feagi-dev/playground image_tag: ${{ github.run_number }}, latest dockerfile: Dockerfile context: ./tmp/playground
thought your working directory in previous step is actually /tmp/playground
, you should use
context: /tmp/playground
instead of ./tmp/playground
(which is /home/runner/work/{repo_owner}/{repo}/tmp/playground
)
I guess the content of /tmp/playground
were created by a previous step which was not included in your repo, so docker could not found the context with the wrong PATH
oh oops, sorry for the delay! I came back to this repo for an arg to build usnig arm64 and I saw a new reply. I will try it out! Thank you for ur time!
The snippet below:
The dockerfile I have is in
/tmp/playground
how come I couldn't use like this:
or
None of them worked. I'm unable to access to see where is the default path it is in. How do I direct
context
to get the/tmp/playground
?