aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
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;