summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Wienke2021-09-26 17:18:14 +0200
committerJohannes Wienke2021-09-26 17:18:14 +0200
commit9e33149ff0f741480aedc24363d54f5343c62bc2 (patch)
treea5c7d34566dcb6f470535f576cb3020b6088eb40
parenta589181df046ec9b964ee9ff1aa5ff7eb21595e8 (diff)
downloadaur-9e33149ff0f741480aedc24363d54f5343c62bc2.tar.gz
ci: add a Gitlab CI definition
-rw-r--r--.gitlab-ci.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 000000000000..9d81096baff6
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,50 @@
+build:
+ stage: build
+ image:
+ name: countstarlight/makepkg:latest
+ entrypoint: [""]
+ before_script:
+ - yay -Syu --noconfirm
+ script:
+ - |
+ depends=()
+ makedepends=()
+ checkdepends=()
+ . ./PKGBUILD
+ deps=( "${depends[@]}" "${makedepends[@]}" "${checkdepends[@]}" )
+ (pacman --deptest "${deps[@]}" || true) | xargs yay -Sy --noconfirm
+ - makepkg -f
+ artifacts:
+ untracked: false
+ expire_in: 5 days
+ paths:
+ - '*.pkg.tar.zst'
+
+test:
+ stage: test
+ image: archlinux:latest
+ script:
+ - pacman -Syu --noconfirm
+ - pacman --noconfirm -U *.pkg.tar.zst
+ - pass-git-helper -h
+
+deploy:
+ stage: deploy
+ image: bitnami/git:latest
+ rules:
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ variables:
+ GIT_DEPTH: "0"
+ before_script:
+ - mkdir -p ~/.ssh
+ - chmod 700 ~/.ssh
+
+ - ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
+ - chmod 644 ~/.ssh/known_hosts
+
+ - eval $(ssh-agent -s)
+ - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
+
+ script:
+ - git remote add aur ssh://aur@aur.archlinux.org/autosuspend.git
+ - git push aur origin/master:master