Skip to content

Cannot "build without cache" when imageName is specified #182

Description

@sarisia

I want to build devcontainer image without using previous built image as a cache in order to
pull upstream image's updates, but specifiying imageName implies cacheFrom and seems
there's no way to disable this.

if (fullImageName) {
if (!cacheFrom.includes(fullImageName)) {
// If the cacheFrom options don't include the fullImageName, add it here
// This ensures that when building a PR where the image specified in the action
// isn't included in devcontainer.json (or docker-compose.yml), the action still
// resolves a previous image for the tag as a layer cache (if pushed to a registry)
core.info(`Adding --cache-from ${fullImageName} to build args`);
cacheFrom.splice(0, 0, fullImageName);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions