.gitlab-ci.yml 811 Bytes
Newer Older
Arthur Lutz's avatar
Arthur Lutz committed
1
stages:
Arthur Lutz's avatar
Arthur Lutz committed
2
  - commitlint
Arthur Lutz's avatar
Arthur Lutz committed
3
4
5
  - build
  - commit

Arthur Lutz's avatar
Arthur Lutz committed
6
7
8
9
10
11
12
13
14
15
commitlint:
  stage: commitlint
  image: node:buster
  script:
    - env
    - npm -g install @commitlint/cli @commitlint/config-conventional
    - echo TODO hg log -r 'topic()' --template "{desc}\n"
    - echo $CI_COMMIT_MESSAGE | commitlint

generate-readme:
Arthur Lutz's avatar
Arthur Lutz committed
16
  image: fribbledom/markscribe
Arthur Lutz's avatar
Arthur Lutz committed
17
  stage: build
Arthur Lutz's avatar
Arthur Lutz committed
18
  script:
Arthur Lutz's avatar
Arthur Lutz committed
19
    - mkdir output
Arthur Lutz's avatar
Arthur Lutz committed
20
    - /go/bin/markscribe -write output/README.md README.md.tpl
Arthur Lutz's avatar
Arthur Lutz committed
21
  artifacts:
Arthur Lutz's avatar
Arthur Lutz committed
22
23
    paths:
      - output/
Arthur Lutz's avatar
Arthur Lutz committed
24
commit-readme:
25
  image: r.intra.logilab.fr/library/mercurial
Arthur Lutz's avatar
Arthur Lutz committed
26
  stage: commit
Arthur Lutz's avatar
Arthur Lutz committed
27
  script:
Arthur Lutz's avatar
Arthur Lutz committed
28
    - mv output/README.md .
Arthur Lutz's avatar
Arthur Lutz committed
29
    - hg add README.md
30
    - hg commit -m 'build: 🤖 generated README.md [skip ci]'
31
    - hg push https://$GITLAB_USER_LOGIN:$PERSONAL_ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH