-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (39 loc) · 1.1 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
language: node_js
node_js: 16.13
services: docker
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
stages:
- build
- publish
branches:
only:
- main
jobs:
include:
# Check prettier linting and build typescript
- stage: build
script:
- yarn run format:check
- yarn run build
# Build types
- cd packages/types
- yarn run format:check
- yarn run build
# Build and publish docker tags
- stage: publish
if: branch == main AND (NOT (type IN (pull_request)))
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USER" --password-stdin
script:
# Build dockerfile
- make build
# Push tags
- make push
# Publish types (if version bumped)
- cd packages/types
- make build
- make push