Skip to content

Added Caching to workflows #1502

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

Closed
wants to merge 2 commits into from
Closed

Conversation

pxsit
Copy link
Contributor

@pxsit pxsit commented Aug 6, 2025

Implement Docker layer caching
Instead of rebuilding the entire Docker image from scratch on every commit, the optimized workflow uses actions/cache to save and reuse the layers of your Docker image. On a new commit, Docker will only have to rebuild the layers that have actually changed, while reusing all the previous layers from the cache.

- push
- pull_request
push:
branches: [ main, develop ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a branch called develop?

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.docker-cache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason for naming the directory with a dot? Just /tmp/docker-cache would seem more straightforward.

@prandla
Copy link
Contributor

prandla commented Aug 6, 2025

Please explain how this is supposed to be better than #1477. Also, currently the debian test is broken; the "run tests" step rebuilds the ubuntu image and uses that instead.

(note that #1477 wasn't quite negative performance impact, I just deemed it not good enough. If we decide the 45 second win is worth the added complexity it brings then we can still pursue this approach.)

@pxsit pxsit closed this Aug 7, 2025
@pxsit pxsit deleted the optimize-gh-workflow branch August 7, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants