Skip to content

Add possibility to deploy flowforge container to stage environment #83

Add possibility to deploy flowforge container to stage environment

Add possibility to deploy flowforge container to stage environment #83

name: Build Flowforge container
on:
workflow_dispatch:
inputs:
flowforge_release_name:
description: 'flowforge package version'
required: false
default: 'nightly'
flowforge_ref:
description: 'flowforge package ref'
required: false
schedule:
- cron: '30 5 * * *'
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-stage:
uses: flowforge/github-actions-workflows/.github/workflows/build_container_image.yml@feat-image-tag-output
with:
environment: 'stage'
image_name: 'forge-k8s'
package_dependencies: |
@flowforge/flowforge
@flowforge/kubernetes
build_context: 'flowforge-container'
npm_registry_url: ${{ vars.PRIVATE_NPM_REGISTRY_URL }}
secrets:
npm_registry_auth_token: ${{ secrets.GITHUB_TOKEN }}
aws_access_key_id: ${{ secrets.STAGING_AWS_ID }}
aws_access_key_secret: ${{ secrets.STAGING_AWS_KEY }}
deploy-stage:
name: Deploy to staging environment
environment: stage
runs-on: ubuntu-latest
needs: build-stage
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.STAGING_AWS_ID }}
aws-secret-access-key: ${{ secrets.STAGING_AWS_KEY }}
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/K8sAdmin
role-duration-seconds: 1200
- name: Setup kubectl
uses: azure/setup-kubectl@v3
with:
version: '1.23.4'
- name: Configure kubectl
run:
aws eks update-kubeconfig --region eu-west-1 --name ${{ secrets.EKS_CLUSTER_NAME }}
- name: Debug kubectl
run: |
kubectl -n default get pods -l app=ubuntu -o jsonpath="{.items[*].status.phase}"