Closed amingilani closed 2 years ago
Hey @amingilani, thanks for reporting the issue, I'll make some time this week to review in full and let you know if I need some more info
Btw, I forked your repo and speed up the action's installation time down to a few seconds. Then I published my fork to learn how publishing actions work. If you'd like please take a look at my fork's Dockerfile
and script. Feel free to merge the code back into your own repo if you'd like. They're minor changes.
Instead of downloading the CLI via NPM I download the latest version of the standalone CLI.
Btw, I forked your repo and speed up the action's installation time down to a few seconds.
I'm glad you could build upon my own learning experience like you have, and thank you for sharing some insights on improving the performance, since I'm diving into the repo today to troubleshoot your problem, I'll probably take the time to apply some of the insights you've shared & add some other improvements to the project.
Initial guess: It doesn't like my default value for application path
since you're not including the value. I do recall that attribute being added towards the end of my initial work; my own implementation here actually wraps another repo for the continuous delivery, which is why I didn't design the action to automatically publish the root of the repo.
I do have a Balena POC that I haven't wired into CD yet, so I'll use that project to troubleshoot the default attribute further. In the mean time (and since you have your own published action), here are two options you can try to quickly unblock yourself:
application-path
definition to workflow fileIn your workflow file, add a line specifying the application path to push. Since you just want to push the root of your repo, try ./
instead of just .
which is the default. See my workflow file for an example
application-path
from the entrypoint scriptSince you're just looking to publish the root of your repo & you've already gone through the trouble of forking & publishing your own action, you could modify the entrypoint.sh file to remove the directory switch.
Instead of this line
cd ${GITHUB_WORKSPACE} && cd ${APPLICATION_PATH} && balena login --token ${API_TOKEN} && balena push ${APPLICATION_NAME}
You could modify yours to
cd ${GITHUB_WORKSPACE} && balena login --token ${API_TOKEN} && balena push ${APPLICATION_NAME}
If you go this route, just remember to clean up references to APPLICATION_PATH
in the codebase so other's don't attempt to use your Action by specifying the a sub directory
Let me know if either of those work!
Thank you for this insightful message, @theaccordance! So, a funny thing happened, and I that apologize I didn't report this earlier, but somehow switching myself to my own action unblocked me. I can't explain it yet, but since it worked, I didn't touch it.
I'll work through the steps you outlined, and report back soon. I'll also try forking my own repo and chasing this bug down so that we can both squash it. I think renaming my repository seemed to cause it, but since I'm on a deadline, I haven't been able to debug it yet.
Either way, thank you for your help, and I'll use your pointers to start on this in a day or so.
@amingilani I am using your fork and it works perfectly. Was unable to get @theaccordance 's working.
@amingilani next time feel free to just open a PR with your fork. I've sync'd your changes with this repo and am marking this closed.
Hi there
At first I thought it was my code, but now as it turns out it isn't. I reran a previously successful action and ran into this:
I did rename my repository in the middle, I don't know if that may have caused the issue, but I doubt that should. All new jobs that I now push are also broken.