mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 01:36:22 +00:00
fix: non-publish branches fail on main
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
.limit_publish_pipelines:
|
||||
rules:
|
||||
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||
variables:
|
||||
PUBLISH_TAG: next
|
||||
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
|
||||
variables:
|
||||
PUBLISH_TAG: latest
|
||||
|
||||
deploy:
|
||||
stage: publish
|
||||
@@ -24,8 +29,6 @@ publish image:
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.12.1-debug
|
||||
entrypoint: [""]
|
||||
variables:
|
||||
PUBLISH_TAG: next
|
||||
script:
|
||||
- >
|
||||
/kaniko/executor
|
||||
@@ -50,9 +53,6 @@ publish image:
|
||||
- IMAGE_NAME: app
|
||||
DEPLOY_DIR: frontend/app
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
variables:
|
||||
PUBLISH_TAG: latest
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
publish packages:
|
||||
@@ -61,16 +61,12 @@ publish packages:
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
GIT_DEPTH: 0
|
||||
PUBLISH_TAG: next
|
||||
script:
|
||||
- pnpm install
|
||||
- pnpm build
|
||||
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
|
||||
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
variables:
|
||||
PUBLISH_TAG: latest
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
publish docs:
|
||||
@@ -84,5 +80,4 @@ publish docs:
|
||||
paths:
|
||||
- public
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
- !reference [.limit_publish_pipelines, rules]
|
||||
|
||||
Reference in New Issue
Block a user