From b50f8c615c2dd4dd0a5e3f43639d4137faa76db8 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 7 Aug 2023 22:24:43 +0200 Subject: [PATCH] Only run pipeline when specific RUN_JOB variable value is set --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8cb05b5..4c519b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,8 @@ stages: update_flake_lock: stage: update_flake_lock + rules: + - if: $RUN_JOB == "update_flake_lock" script: - nix flake update --extra-experimental-features nix-command --extra-experimental-features flakes artifacts: @@ -16,6 +18,8 @@ update_flake_lock: apply: stage: apply + rules: + - if: $RUN_JOB == "deploy" script: - nix-env --install colmena - eval $(ssh-agent -s) @@ -30,6 +34,8 @@ apply: commit_flake: stage: commit_flake + rules: + - if: $RUN_JOB == "update_flake_lock" variables: GIT_AUTHOR_EMAIL: $GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME: $GIT_AUTHOR_NAME