Merge branch 'dev' #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" |