-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.2 KB
/
deploy.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
name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo "checkout repository"
- uses: actions/checkout@v3
- run: echo "setup node"
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: echo "fetching deps"
- run: npm i
- run: npm i typescript -g
- run: echo "compiling code"
- run: npm run build
- run: chmod +x docker-entry.sh
- run: echo "initializing docker"
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: mv Dockerfile dist/
- run: mv .dockerignore dist/
- run: mv docker-entry.sh dist/
- run: mv *.json dist/
- run: echo "building docker image"
- name: docker_build
uses: docker/build-push-action@v2
with:
context: dist/
tags: |
${{ secrets.DOCKERHUB_USER }}/cadence:latest
push: ${{ github.ref == 'refs/heads/master' }}
- run: echo "built docker image ${{ steps.docker_build.outputs.digest }}"