From 1ed5fdcab1a732942f72708d62bf29ad1c9847a2 Mon Sep 17 00:00:00 2001 From: guillaume Date: Tue, 12 Apr 2022 18:40:38 +0200 Subject: [PATCH] docs: guide - always execute an action Signed-off-by: guillaume --- docs/guides/1229-always-execute.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/guides/1229-always-execute.md diff --git a/docs/guides/1229-always-execute.md b/docs/guides/1229-always-execute.md new file mode 100644 index 00000000..9ba2cc89 --- /dev/null +++ b/docs/guides/1229-always-execute.md @@ -0,0 +1,24 @@ +--- +slug: /1229/always-execute +displayed_sidebar: europa +--- + +# How to make sure an action is always being executed ? + +Dagger implemented a way to tell Buildkit not to rely on cache for a specific action. + +The `docker.#Run` and `core.#Exec` definitions have an `always` field: + +```cue +// If set to true, the cache will never be triggered for that specific action. +always: bool | *false +``` + +Any package composed on top of it (`bash.#Run` for example) also exposes this field as it will inherit it from `docker.#Run`: + +```cue +test: bash.#Run & { + always: true + ... +} +```