Only run pipeline when specific RUN_JOB variable value is set

This commit is contained in:
yuri 2023-08-07 22:24:43 +02:00
parent fd9952e9f2
commit b50f8c615c

View file

@ -8,6 +8,8 @@ stages:
update_flake_lock: update_flake_lock:
stage: update_flake_lock stage: update_flake_lock
rules:
- if: $RUN_JOB == "update_flake_lock"
script: script:
- nix flake update --extra-experimental-features nix-command --extra-experimental-features flakes - nix flake update --extra-experimental-features nix-command --extra-experimental-features flakes
artifacts: artifacts:
@ -16,6 +18,8 @@ update_flake_lock:
apply: apply:
stage: apply stage: apply
rules:
- if: $RUN_JOB == "deploy"
script: script:
- nix-env --install colmena - nix-env --install colmena
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
@ -30,6 +34,8 @@ apply:
commit_flake: commit_flake:
stage: commit_flake stage: commit_flake
rules:
- if: $RUN_JOB == "update_flake_lock"
variables: variables:
GIT_AUTHOR_EMAIL: $GIT_AUTHOR_EMAIL GIT_AUTHOR_EMAIL: $GIT_AUTHOR_EMAIL
GIT_AUTHOR_NAME: $GIT_AUTHOR_NAME GIT_AUTHOR_NAME: $GIT_AUTHOR_NAME