stages: - build - docker variables: NODE_VERSION: "20" cache: key: "$CI_COMMIT_REF_SLUG" paths: - ~/.npm/ before_script: - apk update && apk add git - apk add nodejs npm build: stage: build script: - npm ci - npm run build - npx semantic-release - find . -not -path "./node_modules/*" -type f -print0 | xargs -0 tar -czvf build-artifacts.tar.gz artifacts: paths: - build-artifacts.tar.gz docker: stage: docker image: docker:git services: - docker:dind script: - apk add tar - tar -xzvf build-artifacts.tar.gz - echo $DOCKERHUB_TOKEN | docker login --username $DOCKERHUB_USERNAME --password-stdin - docker build -t zyner/xyter:latest . - docker push zyner/xyter:latest