.gitlab-ci.yml 637 Bytes
Newer Older
Seblu's avatar
Seblu committed
1
---
Seblu's avatar
Seblu committed
2 3 4 5

makepkg:
  stage: build
  script:
Seblu's avatar
Seblu committed
6
    - seblu-build
Seblu's avatar
Seblu committed
7 8 9 10 11 12 13 14
  artifacts:
    name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
    expire_in: 1 week
    paths:
      - "*.pkg.tar.xz"

commitpkg:
  stage: deploy
Seblu's avatar
Seblu committed
15
  script:
Seblu's avatar
Seblu committed
16
    - eval $(ssh-agent -s)
17 18 19 20 21
    # - trap "kill $SSH_AGENT_PID" 0
    # trap is broken in gitlab runner, see:
    # https://gitlab.com/gitlab-org/gitlab-runner/issues/3009
    # use a workaournd with sleep and kill:
    - sleep 300 && kill "$SSH_AGENT_PID" & disown
Seblu's avatar
Seblu committed
22 23 24
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - seblu-push
  only:
Seblu's avatar
Seblu committed
25 26 27 28
    refs:
      - master
    changes:
      - PKGBUILD