summarylogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 83f65571be10f349e5da819ee153fcc801c7d805 (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
43
44
45
image: "registry.devseed.de/all-the-things/docker-archlinux"

stages:
  - build
  - check
  - release


before_script:
  - sudo pacman -Sy --noconfirm pacman-contrib namcap
  - git config --global user.email "${GIT_USER_EMAIL:-$GITLAB_USER_EMAIL}"
  - git config --global user.name "${GIT_USER_NAME:-$GITLAB_USER_NAME}"


makepkg:
  stage: build
  script:
    # update package hash for integrity check
    - updpkgsums
    # Test building a source package
    - sudo -u builder makepkg -C -S --log --noconfirm
    # Test building and installing the package
    - sudo -u builder makepkg -C -i --log --noconfirm
  cache:
    key: pkgbuild
    paths:
      - PKGBUILD

namcap:
  stage: check
  script:
    - namcap -i PKGBUILD
  rules:
    - if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
      allow_failure: true

push:
  stage: release
  script:
    - git add PKGBUILD
    - git diff-index --quiet HEAD || git commit -m "updates hash for AppImage"
    - git push -o ci.skip "https://${GITLAB_USER_NAME}:${RENOVATE_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_BRANCH}"
  rules:
    - if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
      when: never