diff --git a/README.md b/README.md index b9a8159..9735feb 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Also makes it possible to split CI parts in a separate module which can be impor ```yaml # .gitlab-ci.yml include: - - component: gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@1.1.1 + - component: gitlab.com/TECHNOFAB/nix-gitlab-ci/nix-gitlab-ci@ # recommendation: use the latest version (try not to use latest) inputs: # specify inputs here, for example: image_tag: latest-cachix @@ -55,8 +55,8 @@ include: To disable any of the provided caches for a pipeline one can set `NIX_CI_DISABLE_CACHE` to anything non-empty (eg. "yes") when triggering the pipeline. -The `build:nix-ci` job has a different special environment variable `NIX_CI_SKIP_CACHE` -(useful if the generated pipeline is outdated but caching should generally still take place). +The `build:nix-ci` job has a different special environment variable `NIX_CI_FORCE_BUILD` +(useful if the generated pipeline in the cache is outdated, this will build it again). ### Run Jobs locally diff --git a/templates/nix-gitlab-ci.yml b/templates/nix-gitlab-ci.yml index 627d15c..911556a 100644 --- a/templates/nix-gitlab-ci.yml +++ b/templates/nix-gitlab-ci.yml @@ -34,9 +34,9 @@ nix-ci:build: - .nix-cache/ before_script: # generated-gitlab-ci.yml exists in the cache - - '[ -f "generated-gitlab-ci.yml" ] && export CACHED=true && echo "Using cached pipeline file (skip cache with NIX_CI_SKIP_CACHE)" || true' + - '[ -f "generated-gitlab-ci.yml" ] && export CACHED=true && echo "A cached pipeline file exists (skip cache with NIX_CI_FORCE_BUILD)" || true' # allow the user to manually skip the cache (when the key files are not correctly configured etc.) - - '[ -n "$NIX_CI_SKIP_CACHE" ] && unset CACHED && echo "Caching skipped for this job (through NIX_CI_SKIP_CACHE)" || true' + - '[ -n "$NIX_CI_FORCE_BUILD" ] && unset CACHED && echo "Caching skipped for this job (through NIX_CI_FORCE_BUILD)" || true' # only setup when we need to generate the pipeline yaml - 'if [ -z "$CACHED" ]; then source setup_nix_ci; fi' script: