Update Graphql uri #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [ "feature/deploy-new-version" ] | |
pull_request: | |
branches: [ "feature/deploy-new-version" ] | |
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 | |
with: | |
role-to-assume: arn:aws:iam::339713015367:role/GithubIdentityProviderRole | |
role-session-name: GithubSession | |
aws-region: us-east-1 | |
- name: Amazon ECR Login | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: Push Docker images | |
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 | |
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 | |