tinkerbell / hook

In-memory Operating System Installation Environment for Executing Tinkerbell Workflows
Apache License 2.0
101 stars 48 forks source link

build: gha: always use GHA cache for Linuxkit Cache in hopes of diminishing DockerHub pull-rate limits trouble #230

Closed rpardini closed 2 months ago

rpardini commented 2 months ago

build: gha: always use GHA cache for Linuxkit Cache in hopes of diminishing DockerHub pull-rate limits trouble

Signed-off-by: Ricardo Pardini ricardo@pardini.net

rpardini commented 2 months ago

Alternatively to this, we could remove the vars CI_RUNNER_LK_ARM64 and CI_RUNNER_LK_AMD64, and thus let LK builds run on GitHub-hosted runners -- then those will have a cache.

The original logic was to disable cache for self-hosted runners as those are (usually/by default) not ephemeral, and always run in the same dir in the host, thus the cache dir should survive across GHA jobs -- this is somehow not happening here @jacobweinstock any idea why?

rpardini commented 2 months ago

the cache dir should survive across GHA jobs -- this is somehow not happening here

Oh damn. I always forget about this -- actions/checkout defaults to clean: true (and fetch-depth: 1!) and thus obliterates the local cache away. Adding with: { clean: false, fetch-depth: 0 } to all the action/checkout calls should also make the cache effective (and git pulls much faster over time) also on self-hosted runners.

Let me know which you prefer -- and if there's something on the runners to make them ephemeral somehow.

rpardini commented 2 months ago

Alternative to this: https://github.com/tinkerbell/hook/pull/231

jacobweinstock commented 2 months ago

Hey @rpardini , lets try this one! Thanks!