ci: fix rules

This commit is contained in:
naskya 2024-05-10 16:32:56 +09:00
parent 4d3072929e
commit 421030c38f
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -61,7 +61,7 @@ default:
build: build:
stage: test stage: test
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'push' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
- packages/backend/* - packages/backend/*
@ -81,20 +81,23 @@ build:
build:client: build:client:
stage: test stage: test
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'push' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
- packages/client/* - packages/client/*
- packages/firefish-js/* - packages/firefish-js/*
- packages/sw/* - packages/sw/*
- locales/**/* - locales/**/*
- if: $CI_PIPELINE_SOURCE == 'push' || $CI_PIPELINE_SOURCE == 'merge_request_event' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
- packages/backend/* - packages/backend/*
- packages/backend-rs/* - packages/backend-rs/*
- packages/macro-rs/* - packages/macro-rs/*
- packages/megalodon/* - packages/megalodon/*
- scripts/**/*
- package.json
- pnpm-lock.yaml
- Cargo.toml - Cargo.toml
- Cargo.lock - Cargo.lock
when: never when: never
@ -154,7 +157,7 @@ build:container:
cargo:test: cargo:test:
stage: test stage: test
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'develop' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
- packages/backend-rs/**/* - packages/backend-rs/**/*
@ -176,7 +179,7 @@ cargo:test:
cargo:clippy: cargo:clippy:
stage: test stage: test
rules: rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' || $CI_COMMIT_BRANCH == 'develop' - if: $CI_COMMIT_BRANCH == 'develop' || $CI_PIPELINE_SOURCE == 'merge_request_event'
changes: changes:
paths: paths:
- packages/backend-rs/**/* - packages/backend-rs/**/*