Skip to content

fix: Fix dashboard

fix: Fix dashboard #46

Workflow file for this run

name: build prod
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install
- run: npm run prod
env:
CI: true
### Prepare docker & login to Dockerhub
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
### Set version
- run: echo "VERSION=0.1.${{github.run_number}}" >> $GITHUB_ENV
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:latest,fluencelabs/dashboard:${{ env.VERSION }}" >> $GITHUB_ENV
### Build and push docker image
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./caddy.Dockerfile
push: true
tags: ${{ env.CONTAINER_TAG }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
### Deploy
- name: Invoke deployment workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy prod
token: ${{ secrets.PERSONAL_TOKEN }}
inputs: '{ "version": "${{ env.VERSION }}" }'