-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.28 KB
/
publish-cloud-dashboard.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
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build-Push dashboard
on:
push:
branches: [ main ]
tags:
- 'v*'
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: Cypress Artifacts
# after the test run completes store videos and any screenshots
# store generated videos and screenshots as CI artifacts.
uses: actions/upload-artifact@v3
# add the line below to store screenshots only on failures
# if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
- uses: actions/upload-artifact@v3
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
- 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
flavor: |
latest=true
- 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 }}