Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Deploy Admin Panel

on:
push:
branches:
- main
paths:
- 'src/**'
- 'server.ts'
- 'package.json'
- 'bun.lock'
- 'Dockerfile'
- '.github/workflows/deploy.yaml'
workflow_dispatch:
inputs:
application:
Expand All @@ -24,9 +14,11 @@ on:
- jarvis-demo
region:
description: 'AWS Region to deploy to'
type: string
type: choice
required: true
default: us-east-1
options:
- us-east-1

permissions:
id-token: write
Expand Down Expand Up @@ -62,8 +54,6 @@ jobs:
name: Build & Push to ECR
runs-on: ubuntu-latest
needs: test
outputs:
image: ${{ steps.tags.outputs.ecr_image }}
steps:
- uses: actions/checkout@v6

Expand All @@ -75,36 +65,30 @@ jobs:
with:
role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }}
role-session-name: deployment-role-session
aws-region: ${{ inputs.region || 'us-east-1' }}
aws-region: ${{ inputs.region }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "897729109735"

- name: Determine image tags
id: tags
run: |
ECR_IMAGE="${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel"
echo "ecr_image=${ECR_IMAGE}:${{ github.sha }}" >> $GITHUB_OUTPUT
echo "tags=${ECR_IMAGE}:${{ github.sha }},${ECR_IMAGE}:latest" >> $GITHUB_OUTPUT

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: ${{ steps.tags.outputs.tags }}
tags: |
${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:latest
provenance: false

deploy:
name: Deploy to EKS
runs-on: ubuntu-latest
needs: build-and-push
if: github.event_name == 'workflow_dispatch'
env:
DEPLOYMENT_NAME: jarvis-admin-panel
steps:
Expand Down Expand Up @@ -143,9 +127,11 @@ jobs:
run: aws eks update-kubeconfig --name ${{ steps.config.outputs.eks_cluster_name }} --region ${{ inputs.region }}

- name: Update image on EKS
env:
admin_panel_image: ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }}
run: |
kubectl set image deploy/${{ env.DEPLOYMENT_NAME }} \
jarvis-admin-panel=${{ needs.build-and-push.outputs.image }} \
jarvis-admin-panel=$admin_panel_image \
-n ${{ inputs.application }}
Comment on lines 129 to 135

- name: Restart pods
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const navItems: t.NavItem[] = [
capability: [SystemCapabilities.READ_ROLES, SystemCapabilities.READ_GROUPS],
},
{ labelKey: 'com_nav_grants', path: '/grants', icon: 'lock' },
{ labelKey: 'com_nav_help', path: '/help', icon: 'question' },
// { labelKey: 'com_nav_help', path: '/help', icon: 'question' },
];

function getUserInitials(user?: { name?: string; email?: string } | null): string {
Expand Down