-
Notifications
You must be signed in to change notification settings - Fork 6
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
Replace actions/cache with a more robust strategy #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey George! Thanks for taking a crack at this. It's much appreciated.
I think this is generally what we want, but I have some specific questions about the implementation:
- For the
test-twostep-container-build.yml
workflow, I'm having some trouble understanding the difference between the run withargs-
and withno-args-
. Can you edit the names and add a comment to explain what the desired result is and how they're different? I get mechanically something is different in the argument specification, but it's not obvious how and why they're meaningfully different tests. - There seems to be some unrelated changes in here for the
post-artifact
action. Should they be in a separate PR? - It would be much faster to tag the dependencies image with the hash and, on re-runs, query the container registry for the tag. That would cut out the image pull and re-build.
The cfa-actions/.github/workflows/test-twostep-container-build.yml Lines 107 to 108 in eb8b7fe
I'm adding a debugging step that posts the
The problem with that is that it would make local builds harder. But I think time should be OK as the pull is done only once: You still need to pull the image in the second step, and I think docker/podman are smart enough to check the hash of the image itself. No? |
This pull request includes several changes to the
twostep-container-build
GitHub Action, focusing on improving caching mechanisms, updating documentation, and enhancing the build process. The most important changes include adding new jobs to test caching, updating the action version, and modifying the action's inputs and outputs. This version dropsactions/cache
to respond to a potential bug reported in #10.Enhancements to caching and build process:
.github/workflows/test-twostep-container-build.yml
: Added new jobstest-no-args-rerun
andtest-with-args
to test caching and build actions. Updated cache keys to include prefixes (no-args-
andwith-args-
). [1] [2] [3] [4]twostep-container-build/action.yml
: Introduced new inputsbuild-labels-1
andbuild-labels-2
for specifying labels during the build process. Added a new outputsummary
to indicate the result of the build (built
,rebuilt
, orcached
). Enhanced the caching mechanism by checking if the image exists and inspecting labels to determine cache validity. [1] [2] [3] [4] [5] [6]Documentation updates:
twostep-container-build/README.md
: Updated the documentation to reflect changes in the caching mechanism and action version. Added a new mermaid diagram to illustrate the caching workflow. [1] [2] [3]Version updates:
post-artifact/README.md
: Updated the action version used for posting artifacts to1.2.0
.Context information:
post-artifact/action.yml
: Added a step to dump GitHub context information for debugging purposes.