Skip to content
.gitlab-ci.yml 667 B
Newer Older
Seblu's avatar
Seblu committed
---
Seblu's avatar
Seblu committed

makepkg:
  stage: build
  script:
Seblu's avatar
Seblu committed
    - seblu-build
Seblu's avatar
Seblu committed
  artifacts:
    name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME
    expire_in: 1 week
    paths:
      - config.x86_64
      - "*.pkg.tar.xz"
  only:
    refs:
      - tags
Seblu's avatar
Seblu committed
      - web
Seblu's avatar
Seblu committed

commitpkg:
  stage: deploy
Seblu's avatar
Seblu committed
  script:
Seblu's avatar
Seblu committed
    - eval $(ssh-agent -s)
    # - 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
    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
    - seblu-push
  only:
    refs:
      - tags
Seblu's avatar
Seblu committed
      - web