Skip to content

Fix forecast

Fix forecast #247

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image - Frontend
run: docker build ./frontend --tag 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/frontend:${{ github.run_id }} --tag 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/frontend:latest
- name: Build the Docker image - Backend
run: docker build ./backend --tag 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/backend:${{ github.run_id }} --tag 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/backend:latest
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
role-to-assume: arn:aws:iam::339713015367:role/GithubIdentityProviderRole
role-session-name: GithubSession
aws-region: us-east-1
- name: Amazon ECR Login
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: aws-actions/amazon-ecr-login@v2
- name: Push Docker images
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
docker image push 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/frontend:${{ github.run_id }}
docker image push 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/frontend:latest
docker image push 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/backend:${{ github.run_id }}
docker image push 339713015367.dkr.ecr.us-east-1.amazonaws.com/omniscope/backend:latest
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::339713015367:role/GithubIdentityProviderRole
role-session-name: GithubSession
aws-region: us-east-1
- name: Deploy Backend
run: |
aws eks update-kubeconfig --name ia-factory-cluster --region us-east-1
helm upgrade --install backend ./deploy/chart/omniscope --namespace omniscope -f ./deploy/values-backend.yml --set image.tag=${{ github.run_id }} --wait
helm upgrade --install frontend ./deploy/chart/omniscope --namespace omniscope -f ./deploy/values-frontend.yml --set image.tag=${{ github.run_id }} --wait