summarylogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: fe29e762f756db5d17aab7a84d198981608e0539 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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'

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/jdtls.git
    - git push aur origin/master:master