Docker cache fails to load on tags/releases
Closed this issue · 4 comments
Problem/Motivation
I have forked this repository to https://github.com/a2i2/hassio-addon-pubsub and replaced the add-on content with my own. I am using the Actions in .github/workflows
to build the add-on.
When I push to the main
branch, the Docker cache works perfectly and the build is very quick. However, when I use GitHub Releases to produce a new release/tag, the Docker cache isn't loaded and the build is performed from scratch.
Output of the Set up build cache
step:
Run actions/cache@v2.1.6
Cache not found for input keys: docker-refs/tags/v0.2.2-aarch64-66ca8825aebfda283e1368507bd197e35314a57a, docker-refs/tags/v0.2.2-aarch64
It looks like the same thing happens with this example repository:
https://github.com/hassio-addons/addon-example/runs/2380713962?check_suite_focus=true
Expected behavior
Docker cache is found and used on tagged releases
Actual behavior
Docker cache is not found on tagged releases; build is performed from scratch and takes a long time
Steps to reproduce
Create a GitHub Release, go to Actions and find the cache
step and see message saying no cache was found.
Proposed changes
Not sure what the fix would be. Load the cache from edge
?
Not sure how the actions are related to the example addon. Would recommend that you seek help on Discord for troubleshooting it if needed.
Edit - Should also add, we can't control Github runners.
@sinclairpaul Isn't the intent of this repository to give a complete example of how add-ons should be structured/built/published? The "About" section at the top of the README says:
It shows off several features and structures like:
- Full blown GitHub repository.
- ...
- Continuous integration and deployment using GitHub Actions.
It looks like a lot of effort has gone into making the actions generic so that they can be reused. That's certainly been my experience so far; the only issue has been that the Docker cache doesn't work for releases.
I am happy to accept improvements, they are made generic for this project, feel free to use; however, the goal is not generic distribution for everyone.
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!