Skip to content

Managed dashboard

Managed dashboard #18

name: Build-Push dashboard
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Cypress run
uses: cypress-io/github-action@v5
with:
install-command: yarn --frozen-lockfile --silent
# using the action parameter command causes multiple other parameters to be ignored
#command: yarn cypress:open
component: true
browser: chrome
build: yarn build
start: yarn start
wait-on: "http://localhost:3000"
# wait for 2 minutes for the server to respond
wait-on-timeout: 120
# Cancel the run after 2 failed tests # run with cloud only
# auto-cancel-after-failures: 2
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: |
docker.io/kotalco/cloud-dashboard
tags: |
type=ref,event=tag
type=sha,prefix=,suffix=,format=short
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: kotalco
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}