-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache docker image #42
Comments
dont know if thats possible. |
Lets cast a net: https://stackoverflow.com/questions/64174918/github-actions-docker-caching :) |
Instead of caching, the action can be built as a JS action: https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action. |
I forked this repo, created a DockerHub repository, and set up a demo repo to attempt to pull a published image instead of building per workflow execution. Turns out, it's supported, but not very well documented! Investigative work can be found in the StackOverflow question, but for now, please see #115 for a solution :^) |
I've created a fork that switches this action to a JavaScript action. Unfortunately, as indicated in this documentation, I would much rather use a bundler like webpack to bundle the assets of this project, but because it depends on actions-toolkit, which uses dynamic imports, the bundled file throws an exception. |
I was really dissatisfied with adding In order to get this working, I needed to remove actions-toolkit and hand-wrote the few pieces of it that this library was actually using. After doing that, it became apparent we might not even need those. I might create yet another branch that doesn't even use the bundler; if we remove all of our dependencies (right now just execa for spawning a child process and Signale for pretty logging), we can just execute |
execa was admittedly a little more difficult to peel off, but I created my last branch (for today) to remove all runtime dependencies entirely, so that Sorry for the PR spam, I wasn't sure which (if any) of these would be preferable... they're sequential but we can squash the PR on whichever one you prefer (also if any). |
merged. thanks to @melody-universe ! |
Is there a way to cache the docker image of this action so it doesn't have to build each time? It takes a long time to run and it runs upfront before the rest of the steps.
The text was updated successfully, but these errors were encountered: