I want to set GIT_DEPTH to results of different expressions in different jobs. It may be count of commits from create branch or result of arithmetic expression. But I can’t set variable to expression, like
variables: GIT_DEPTH: $(if [ $"CI_COMMIT_REF_NAME" == "master" ]; then 1; fi) build: stage: build script: - echo $GIT_DEPTH
Here is anybody who know about how it works?