Skip to content

feat: Add maintenance API check to deployment script #145

feat: Add maintenance API check to deployment script

feat: Add maintenance API check to deployment script #145

Workflow file for this run

---
name: build-image-and-push
on:
push:
workflow_dispatch:
inputs:
image-version:
description: 'Version of the image to build'
required: true
default: 'stable'
namespace:
description: 'Namespace to deploy to'
required: true
default: 'default'
jobs:
build:
name: build-image-and-push
runs-on: self-hosted
outputs:
version: ${{ steps.chart_version.outputs.version }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Get appVersion from Chart.yaml
id: chart_version
run: |
VERSION=$(grep '^appVersion:' stockflow/Chart.yaml | awk '{print $2}' | tr -d '"')
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Login to dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push signal-engine
uses: docker/build-push-action@v5
with:
context:
file: ./dockerfiles/Dockerfile.signal-engine
push: true
tags: kingaiva/signal-engine:${{ inputs.image-version || 'dev' }}
- name: Build and push stockflow-controller
uses: docker/build-push-action@v5
with:
context:
file: ./dockerfiles/Dockerfile.stockflow-controller
push: true
tags: kingaiva/stockflow-controller:${{ inputs.image-version || steps.chart_version.outputs.version || 'dev' }}
- name: Build and push market-intel-engine
uses: docker/build-push-action@v5
with:
context:
file: ./dockerfiles/Dockerfile.market-intel-engine
push: true
tags: kingaiva/market-intel-engine:${{ inputs.image-version || steps.chart_version.outputs.version || 'dev' }}
- name: Build and push stockflow-common
uses: docker/build-push-action@v5
with:
context:
file: ./dockerfiles/Dockerfile.stockflow-common
push: true
tags: kingaiva/stockflow-common:${{ inputs.image-version || steps.chart_version.outputs.version || 'dev' }}
- name: Build and push stockflow-common
uses: docker/build-push-action@v5
with:
context:
file: ./dockerfiles/Dockerfile.stockflow-common
push: true
tags: kingaiva/stockflow-common:${{ inputs.image-version || 'dev' }}
deploy:
needs: build
uses: ./.github/workflows/deploy-stockflow.yml
with:
namespace: ${{ inputs.namespace || 'dev' }}
image-version: ${{ inputs.image-version || needs.build.outputs.version || 'dev' }}
secrets: inherit
test:
needs: deploy
uses: ./.github/workflows/test.yaml
with:
namespace: ${{ inputs.namespace || 'dev' }}