Files
ds-bot/.gitlab-ci.yml
2023-04-12 18:24:34 -07:00

38 lines
589 B
YAML

services:
- docker:dind
stages:
- build
- publish
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- node_modules/
build:
image: node:latest
stage: build
script:
- npm install
- npm run lint
- npm run build
artifacts:
untracked: false
when: on_success
expire_in: "3 days"
paths:
- dist/
tags:
- docker
publish:
image: docker:latest
stage: publish
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --rm -t $CONTAINER_IMAGE .
- docker push $CONTAINER_IMAGE
tags:
- docker