mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
skip jobs that don't make artifacts on main branch
This is okay because we only allow fast-forward merges, changes always go through MRs, and MRs are subject to, e.g., the code quality checks. This change is desirable because it should save some time and energy.
This commit is contained in:
parent
976aef690f
commit
f4dfb496e1
2 changed files with 14 additions and 1 deletions
|
|
@ -35,11 +35,18 @@ before_script:
|
|||
# Set CARGO_HOME to a cacheable path
|
||||
- export CARGO_HOME="$(git rev-parse --show-toplevel)/.gitlab-ci.d/cargo"
|
||||
|
||||
ci:
|
||||
|
||||
cache-ci-deps:
|
||||
stage: ci
|
||||
image: nixos/nix:2.18.2
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script: direnv exec . job cache-ci-deps
|
||||
|
||||
ci:
|
||||
stage: ci
|
||||
image: nixos/nix:2.18.2
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
script:
|
||||
- direnv exec . job ci
|
||||
|
|
|
|||
6
bin/job
6
bin/job
|
|
@ -21,6 +21,12 @@ job_pages() (
|
|||
chmod u+w -R public
|
||||
)
|
||||
|
||||
job_cache-ci-deps() (
|
||||
set -euo pipefail
|
||||
|
||||
nix-build-and-cache ci
|
||||
)
|
||||
|
||||
bail() (
|
||||
set -euo pipefail
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue