mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
set rules for gitlab ci jobs
This should give us access to more CI variables. This also replaces our usage of `only`, which is apparently deprecated.
This commit is contained in:
parent
2f8e0e3e52
commit
f0e41ade59
1 changed files with 8 additions and 2 deletions
|
|
@ -38,6 +38,9 @@ before_script:
|
|||
ci:
|
||||
stage: ci
|
||||
image: nixos/nix:2.18.2
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
script:
|
||||
- ./bin/nix-build-and-cache ci
|
||||
|
||||
|
|
@ -50,17 +53,20 @@ ci:
|
|||
artifacts:
|
||||
stage: artifacts
|
||||
image: nixos/nix:2.18.2
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||
script:
|
||||
- ./bin/nix-build-and-cache packages
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
image: nixos/nix:2.18.2
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
script:
|
||||
- nix build .#website-root
|
||||
- cp --recursive --dereference result public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- main
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue