diff --git a/.gitlab/workflows/.gitlab-ci.main.yml b/.gitlab/workflows/.gitlab-ci.main.yml index ef93ac3..5f03320 100644 --- a/.gitlab/workflows/.gitlab-ci.main.yml +++ b/.gitlab/workflows/.gitlab-ci.main.yml @@ -15,7 +15,7 @@ tag: stage: tag image: alpine:latest rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /^ci:|^chore:|^\[no-publish\]/' script: - set -euo pipefail - apk add --no-cache git @@ -55,7 +55,7 @@ publish: stage: publish needs: [ "tag" ] rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /^ci:|^chore:|^\[no-publish\]/' cache: key: files: @@ -81,7 +81,7 @@ reset: needs: [ "publish" ] image: alpine:latest rules: - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE !~ /^ci:|^chore:|^\[no-publish\]/' script: - set -euo pipefail - apk add --no-cache git @@ -97,7 +97,6 @@ reset: # Mirror to GitHub mirror-to-github: stage: mirror - needs: [ "publish" ] image: alpine:latest rules: - if: '$CI_COMMIT_BRANCH == "main"' diff --git a/.gitlab/workflows/.gitlab-ci.test.yml b/.gitlab/workflows/.gitlab-ci.test.yml index 46a1b92..397ccd8 100644 --- a/.gitlab/workflows/.gitlab-ci.test.yml +++ b/.gitlab/workflows/.gitlab-ci.test.yml @@ -5,7 +5,7 @@ stages: publish: stage: publish rules: - - if: '$CI_COMMIT_BRANCH == "test"' + - if: '$CI_COMMIT_BRANCH == "test" && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")' script: - echo "πŸ”§ 授予 gradlew ζ‰§θ‘Œζƒι™..." - chmod +x gradlew