digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 397 forks source link

Don't set APP_CACHE_DIR if --no-cache is passed with apps dev build #1603

Closed fumblehool closed 3 weeks ago

fumblehool commented 3 weeks ago

Description

It mounts the/cnb/cache directory for caching the build. This fails to build in Github Actions since user doesn't have permission to write to / Error message is : Error: failed to chown volumes: chown /cnb/cache: operation not permitted

doctl apps dev build has a flag --no-cache which disables the caching docs-link. But this is not being used for buildpack-based builds.

This PR fixes this behavior to disable caching when --no-cache is set.