aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2021-11-02 12:54:58 +0800
committerKunoiSayami <[email protected]>2021-11-02 12:54:58 +0800
commit3ac0b49086adc67d872c68b7eaa87422732a8685 (patch)
tree5010abd4ac0a9864a05c0c843d73f2782b7ec288 /.gitlab-ci.yml
parent8628d0e47ad672e131372852110ad65781657171 (diff)
fix(ci): Fix CI condition
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml16
1 files changed, 10 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7ffba06..468ff53 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,9 @@ stages:
build:
stage: build
+ variables:
+ GIT_SUBMODULE_STRATEGY: recursive
+
artifacts:
untracked: true
expire_in: 1 day
@@ -25,7 +28,6 @@ build:
- pacman-key --init
- pacman --noconfirm --needed -Sy archlinuxcn-keyring
- pacman --noconfirm --needed -Su base-devel gnupg git yay
- - git submodule update --init
- useradd -m build
- echo 'build ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers
#- cp -r ../$CI_PROJECT_TITLE /home/build/
@@ -39,11 +41,13 @@ build:
post:
stage: post
- only:
- refs:
- - master
- changes:
- - repo/**/*
+ rules:
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ changes:
+ # - .gitlab-ci.yml
+ # - pkgbuild.sh
+ - repo/**/*
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_TITLE =~ /REBUILD/
script:
- if [ -n "$TARGET_HOSTS" ]; then echo "$TARGET_HOSTS" | base64 -d >> /etc/hosts; fi;