Skip to content

Commit

Permalink
Revert "Fix: merge conflicts"
Browse files Browse the repository at this point in the history
This reverts commit 8d005c0, reversing
changes made to 6c51746.
  • Loading branch information
Sambit003 committed Sep 8, 2024
1 parent 8d005c0 commit 6ac6f14
Show file tree
Hide file tree
Showing 84 changed files with 2,599 additions and 4,124 deletions.
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ SMTP_EMAIL_ADDRESS=
SMTP_PASSWORD=
FROM_EMAIL="your-name <[email protected]>"

MINIO_ENDPOINT=
MINIO_PORT=
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
MINIO_USE_SSL=
MINIO_BUCKET_NAME=
MINIO_ENDPOINT='localhost'
MINIO_PORT=9000
MINIO_ACCESS_KEY=<my_access_key>
MINIO_SECRET_KEY=<my_secret_key>
MINIO_USE_SSL=false
MINIO_BUCKET_NAME=<my_bucket_name>

JWT_SECRET=secret

Expand Down
44 changes: 4 additions & 40 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,28 @@ jobs:
const comment = context.payload.comment;
const issue = context.issue;
const owner = "keyshade-xyz";
const repo = "keyshade";
async function updateProjectStatus(issueNumber) {
const projectsResponse = await github.rest.projects.listForRepo({
owner,
repo,
per_page: 100,
});
for (const project of projectsResponse.data) {
const columnsResponse = await github.rest.projects.listColumns({
project_id: project.id,
per_page: 100,
});
const inProgressColumn = columnsResponse.data.find(column => column.name === "In Progress");
if (!inProgressColumn) continue;
const cardsResponse = await github.rest.projects.listCards({
column_id: inProgressColumn.id,
per_page: 100,
});
const issueCardExists = cardsResponse.data.some(card => card.content_id === issueNumber && card.content_type === "Issue");
if (!issueCardExists) {
await github.rest.projects.createCard({
column_id: inProgressColumn.id,
content_id: issueNumber,
content_type: "Issue",
});
}
}
}
const repo = "keyshade"
if (comment.body.startsWith('/attempt')) {
if (!issue.assignee) {
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: issue.number,
assignees: [comment.user.login],
assignees: [comment.user.login]
});
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body: `Assigned the issue to @${comment.user.login}!`,
body: `Assigned the issue to @${comment.user.login}!`
});
await updateProjectStatus(issue.number);
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number: issue.number,
body: 'This issue is already assigned. Tag a maintainer if you need to take over.',
body: 'This issue is already assigned. Tag a maintainer if you need to take over.'
});
}
}
128 changes: 64 additions & 64 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,78 +17,78 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.SECRET_KEY }}
# aws-region: ap-south-1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_KEY }}
aws-region: ap-south-1

# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

# - name: Build Docker image
# id: build
# env:
# ECR_REGISTRY: ${{ vars.ECR_REGISTRY }}
# ECR_REPOSITORY: ${{ vars.ECR_API_REPOSITORY }}
# run: |
# # Build a docker container and push it to ECR
# aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6} -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f ./apps/api/Dockerfile .
# echo "Pushing image to ECR..."
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6}
# echo "name=image::$ECR_REGISTRY/$ECR_REPOSITORY:latest" >> $GITHUB_OUTPUT
- name: Build Docker image
id: build
env:
ECR_REGISTRY: ${{ vars.ECR_REGISTRY }}
ECR_REPOSITORY: ${{ vars.ECR_API_REPOSITORY }}
run: |
# Build a docker container and push it to ECR
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6} -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f ./apps/api/Dockerfile .
echo "Pushing image to ECR..."
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6}
echo "name=image::$ECR_REGISTRY/$ECR_REPOSITORY:latest" >> $GITHUB_OUTPUT
# setup-database:
# needs: build
# name: Setup Database
# runs-on: ubuntu-latest
# environment: alpha
setup-database:
needs: build
name: Setup Database
runs-on: ubuntu-latest
environment: alpha

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

# - name: Install pnpm
# uses: pnpm/action-setup@v4
# with:
# version: 9.2.0
# run_install: false
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.2.0
run_install: false

# - name: Deploy migrations
# env:
# DATABASE_URL: ${{ secrets.DATABASE_URL }}
# run: pnpm db:deploy-migrations
- name: Deploy migrations
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: pnpm db:deploy-migrations

# deploy:
# needs: [build, setup-database]
# runs-on: ubuntu-latest
# environment: alpha
# name: Deploy API docker image for release
deploy:
needs: [build, setup-database]
runs-on: ubuntu-latest
environment: alpha
name: Deploy API docker image for release

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.SECRET_KEY }}
# aws-region: ap-south-1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_KEY }}
aws-region: ap-south-1

# - name: Force re-deploy task in service
# id: force-redeploy
# env:
# ECS_CLUSTER: ${{ vars.ECS_CLUSTER }}
# ECS_SERVICE: ${{ vars.ECS_API_SERVICE }}
# run: |
# aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment
- name: Force re-deploy task in service
id: force-redeploy
env:
ECS_CLUSTER: ${{ vars.ECS_CLUSTER }}
ECS_SERVICE: ${{ vars.ECS_API_SERVICE }}
run: |
aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment
86 changes: 43 additions & 43 deletions .github/workflows/deploy-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,52 +22,52 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.SECRET_KEY }}
# aws-region: ap-south-1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_KEY }}
aws-region: ap-south-1

# - name: Login to Amazon ECR
# id: login-ecr
# uses: aws-actions/amazon-ecr-login@v2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

# - name: Build Docker image
# id: build
# env:
# ECR_REGISTRY: ${{ vars.ECR_REGISTRY }}
# ECR_REPOSITORY: ${{ vars.ECR_PLATFORM_REPOSITORY }}
# run: |
# # Build a docker container and push it to ECR
# aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
# docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6} -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f ./apps/platform/Dockerfile .
# echo "Pushing image to ECR..."
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6}
# echo "name=image::$ECR_REGISTRY/$ECR_REPOSITORY:latest" >> $GITHUB_OUTPUT
- name: Build Docker image
id: build
env:
ECR_REGISTRY: ${{ vars.ECR_REGISTRY }}
ECR_REPOSITORY: ${{ vars.ECR_PLATFORM_REPOSITORY }}
run: |
# Build a docker container and push it to ECR
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6} -t $ECR_REGISTRY/$ECR_REPOSITORY:latest -f ./apps/platform/Dockerfile .
echo "Pushing image to ECR..."
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${GITHUB_SHA::6}
echo "name=image::$ECR_REGISTRY/$ECR_REPOSITORY:latest" >> $GITHUB_OUTPUT
# deploy:
# needs: build
# runs-on: ubuntu-latest
# environment: alpha
# name: Deploy Platform docker image for release
deploy:
needs: build
runs-on: ubuntu-latest
environment: alpha
name: Deploy Platform docker image for release

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v4
# with:
# aws-access-key-id: ${{ secrets.ACCESS_KEY }}
# aws-secret-access-key: ${{ secrets.SECRET_KEY }}
# aws-region: ap-south-1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_KEY }}
aws-region: ap-south-1

# - name: Force re-deploy task in service
# id: force-redeploy
# env:
# ECS_CLUSTER: ${{ vars.ECS_CLUSTER }}
# ECS_SERVICE: ${{ vars.ECS_PLATFORM_SERVICE }}
# run: |
# aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment
- name: Force re-deploy task in service
id: force-redeploy
env:
ECS_CLUSTER: ${{ vars.ECS_CLUSTER }}
ECS_SERVICE: ${{ vars.ECS_PLATFORM_SERVICE }}
run: |
aws ecs update-service --cluster $ECS_CLUSTER --service $ECS_SERVICE --force-new-deployment
22 changes: 0 additions & 22 deletions .github/workflows/docker-ci.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/validate-api-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ jobs:
run: |
pnpm run lint:api-client
- name: Build
run: |
pnpm run build:api-client
- name: Test
run: |
pnpm run test:api-client
Expand Down
Loading

0 comments on commit 6ac6f14

Please sign in to comment.