Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

EVEREST-107 Rename TargetNamespaces to AllowedNamespaces (#460) #58

EVEREST-107 Rename TargetNamespaces to AllowedNamespaces (#460)

EVEREST-107 Rename TargetNamespaces to AllowedNamespaces (#460) #58

Workflow file for this run

name: Build and push RC image
on:
push:
branches:
- release-[0-9]+.[0-9]+.[0-9]+*
workflow_run:
workflows: ["Create RC branches"]
types:
- completed
env:
NODE_OPTIONS: "--max_old_space_size=4096"
jobs:
build:
runs-on: ubuntu-latest
env:
VERSION: ''
RELEASE_BRANCH_NAME: ''
steps:
- name: Define release branch name
run: |
echo "RELEASE_BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Define version name
run: |
semantic_version=${RELEASE_BRANCH_NAME#"release-"}
echo "VERSION=v${semantic_version}" >> $GITHUB_ENV
- name: Configure git for private modules
env:
ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }}
run: git config --global url."https://percona-platform-robot:${ROBOT_TOKEN}@github.com".insteadOf "https://github.com"
- name: Check out Everest frontend
uses: actions/checkout@v4
with:
repository: percona/percona-everest-frontend
ref: ${{ env.RELEASE_BRANCH_NAME }}
path: percona-everest-frontend
token: ${{ secrets.ROBOT_TOKEN }}
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Run with Node 16
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache-dependency-path: percona-everest-frontend/pnpm-lock.yaml
- name: Build Everest Frontend app
run: |
cd percona-everest-frontend
pnpm install
EVEREST_OUT_DIR=build pnpm build
mkdir ${GITHUB_WORKSPACE}/front
cp -rvf ./build/* ${GITHUB_WORKSPACE}/front/
- name: Check out Everest Backend
uses: actions/checkout@v4
with:
path: ./backend
ref: ${{ env.RELEASE_BRANCH_NAME }}
token: ${{ secrets.ROBOT_TOKEN }}
fetch-depth: 0
- name: Embed Everest Frontend app into backend
run: |
cp -rf ${GITHUB_WORKSPACE}/front/* ${GITHUB_WORKSPACE}/backend/public/dist/
cd ${GITHUB_WORKSPACE}/backend
- uses: actions/setup-go@v5
with:
go-version-file: './backend/go.mod'
- name: Build Everest
run: |
cd ${GITHUB_WORKSPACE}/backend
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build
- name: Setup docker build metadata
uses: docker/metadata-action@v5
id: meta
with:
images: perconalab/everest
tags: ${{ env.VERSION }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push everest RC-image
uses: docker/build-push-action@v5
with:
context: backend
push: true
tags: ${{ steps.meta.outputs.tags }}