Skip to content

set staging environment to AWS EKS cluster #99

set staging environment to AWS EKS cluster

set staging environment to AWS EKS cluster #99

name: Build-Push dashboard
on:
pull_request:
branches:
- main
- staging
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: update managed-dashboard with secrets values - staging
env:
NEXT_PUBLIC_WS_API_URL: "${{ secrets.STAGING_NEXT_PUBLIC_WS_API_URL }}"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "${{ secrets.STAGING_NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY }}"
API_URL: "${{ secrets.STAGING_API_URL }}"
run: |
envsubst < .env.production > .env.production.tmp
mv .env.production.tmp .env.production
# - 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-pr
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 }}