mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01: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:
|
ci:
|
||||||
stage: ci
|
stage: ci
|
||||||
image: nixos/nix:2.18.2
|
image: nixos/nix:2.18.2
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
script:
|
script:
|
||||||
- ./bin/nix-build-and-cache ci
|
- ./bin/nix-build-and-cache ci
|
||||||
|
|
||||||
|
|
@ -50,17 +53,20 @@ ci:
|
||||||
artifacts:
|
artifacts:
|
||||||
stage: artifacts
|
stage: artifacts
|
||||||
image: nixos/nix:2.18.2
|
image: nixos/nix:2.18.2
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
||||||
script:
|
script:
|
||||||
- ./bin/nix-build-and-cache packages
|
- ./bin/nix-build-and-cache packages
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: nixos/nix:2.18.2
|
image: nixos/nix:2.18.2
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
script:
|
script:
|
||||||
- nix build .#website-root
|
- nix build .#website-root
|
||||||
- cp --recursive --dereference result public
|
- cp --recursive --dereference result public
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
only:
|
|
||||||
- main
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue