-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (73 loc) · 2.5 KB
/
node-ci-dev.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Node CI Develop
on:
push:
branches:
- develop
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: set up node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: check out code
uses: actions/checkout@v4
- name: rename config file
run: mv src/common/utils/clientConfig.sample.ts src/common/utils/clientConfig.ts
- name: install
run: yarn install
- name: unit tests
run: yarn test-coverage
env:
CI: true
- name: upload test coverage to codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
needs: test
runs-on: ubuntu-20.04
steps:
- name: check out code
uses: actions/checkout@v4
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: cache docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: log into dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: get short sha
id: type
run: |
sha=$(git rev-parse --short HEAD)
echo ::set-output name=id::${sha}
- name: docker build and push (ericdev)
uses: docker/build-push-action@v5
with:
push: true
tags: dictybase/dicty-frontpage:ericdev-develop-${{ steps.type.outputs.id }}
build-args: |
graphql_server=https://ericgraphql.dictybase.dev
client_keys=https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.1/clientConfig.eric.js
ga_tracking_id=-UA-146763741-1
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: docker build and push (devsidd)
uses: docker/build-push-action@v5
with:
push: true
tags: dictybase/dicty-frontpage:devsidd-develop-${{ steps.type.outputs.id }}
build-args: |
graphql_server=https://siddgraphql.dictybase.dev
client_keys=https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.1/clientConfig.sidd.js
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache