.gitlab-ci.yml 782 Bytes
Newer Older
1 2 3 4 5 6 7 8
image: docker:git

services:
  - docker:dind

build-list-update:
  stage: build
  only:
Vesa Vertainen's avatar
Vesa Vertainen committed
9
    - master
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
  before_script:
    - eval $(ssh-agent -s)
    - echo "$GIT_SSH_PRIV_KEY" | ssh-add -
    - mkdir -p ~/.ssh
    - chmod 700 ~/.ssh
    - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
    - chmod 644 ~/.ssh/known_hosts
    - git config --global user.email "[email protected]"
    - git config --global user.name "cincan-pipelines-ci"
  script:
    - git clone [email protected]:${CI_PROJECT_PATH}.git
    - cd ${CI_PROJECT_NAME}
    - pwd
    - ls
    - sh update-readme.sh
    - git add README.md
Vesa Vertainen's avatar
Vesa Vertainen committed
26
    - git diff --cached --exit-code && exit 0 || git commit -m "update pipelines in README.md [ci skip]"
27 28 29
    - echo $CI_COMMIT_REF_NAME
    - git push origin HEAD:$CI_COMMIT_REF_NAME