Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): Add release pipeline (#297) #407

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
b325448
postman: Refactored as per v2.0.0
rajdip-b Jun 12, 2024
3c042cf
postman: Update conflicting request
rajdip-b Jun 12, 2024
e883db2
docs: added running-the-web-app.md (#269)
qhtutorials Jun 13, 2024
d82782f
fix(web): Resolve encryption glitch in footer text (#267)
Aleesssino Jun 15, 2024
3d63238
Update auto-assign.yaml
kriptonian1 Jun 16, 2024
b4acfaa
Feat(workflows): Tag user on attempt's reply body
kriptonian1 Jun 16, 2024
36619b0
postman: Organised web hook url to postman vault
kriptonian1 Jun 23, 2024
39525ce
feat(api): Add `requireRestart` parameter (#286)
yogesh1801 Jun 26, 2024
b1ff058
feat(cli): Added CLI (#289)
rajdip-b Jun 27, 2024
40b6be1
postman: Added examples and updated as per 2.1.0
rajdip-b Jun 27, 2024
b725a36
postman: Remove dummy API key
rajdip-b Jun 27, 2024
87b3c85
chore(release): 2.0.0 [skip ci]
semantic-release-bot Jun 12, 2024
68f51a5
chore(release): 2.1.0 [skip ci]
semantic-release-bot Jun 27, 2024
cb0f301
feat(web): Add Pricing Page (#243)
HarshPatel5940 Jun 27, 2024
2eb0582
postman: Delete postman directory
rajdip-b Jun 27, 2024
439d0b5
feat(api): Updated API key
rajdip-b Jun 27, 2024
ef67bde
chore(web): Update Terms and Conditions and Privacy Policy (#282)
Aleesssino Jun 27, 2024
b272df3
docs(web): Add documentation about our web package (#268)
vr-varad Jun 28, 2024
903fd84
refactor(cli): Updated configuration commands and mechanism (#310)
rajdip-b Jul 3, 2024
b3249fb
docs: Update Discord link
rajdip-b Jul 3, 2024
3202b90
refactor(api): Update secret and variable fetching endpoints
rajdip-b Jul 4, 2024
be616c9
chore(CI): Updated action plugin versions
rajdip-b Jul 4, 2024
5dba522
chore(CI): Updated pnpm version in CI file
rajdip-b Jul 4, 2024
d55b4d4
docs: Update README.md
rajdip-b Jul 4, 2024
c4eb241
feat(platform): View secrets (#313)
kriptonian1 Jul 6, 2024
2524a5e
chore(platform): Fixed env parsing in platform
rajdip-b Jul 6, 2024
288384c
docs(cli): Added docs for the CLI package (#329)
rajdip-b Jul 7, 2024
905ff9d
docs(cli): Added usage docs (#330)
rajdip-b Jul 7, 2024
b29ac91
refactor(cli): Refactored profile commands into readable blocks (#331)
rajdip-b Jul 7, 2024
bc15ead
chore(api): Updated response types in environment service
rajdip-b Jul 10, 2024
8dc0da9
feat(api-client): Added API Client package (#346)
rajdip-b Jul 10, 2024
4b3ea35
chore(ci): Added release scripts for platform and api
rajdip-b Jul 11, 2024
5e18dda
chore(release): 2.2.0 [skip ci]
semantic-release-bot Jul 11, 2024
0f58c9e
chore(CI): Include migration deployment in API deploy pipeline
rajdip-b Jul 11, 2024
3090a88
chore(CI): Separated deployment and docker build jobs
rajdip-b Jul 11, 2024
e36293a
chore(CI): Setup inter-job dependency
rajdip-b Jul 11, 2024
74b9521
refactor(api): Updated Redis provider
rajdip-b Jul 12, 2024
be8bda5
chore: Updated deployment scripts and added health check in platform
rajdip-b Jul 12, 2024
ca6cfec
chore(api): Alter cache rehydration interval
rajdip-b Jul 12, 2024
7f2a622
chore(ci): Fixed deployment scripts
rajdip-b Jul 12, 2024
521ab30
chore(ci): Fixed platform script
rajdip-b Jul 12, 2024
79bf2e1
chore(ci): Add names to CI files
rajdip-b Jul 12, 2024
c2de603
docs: Added docker details in setting-things-up.md (#358)
rajdip-b Jul 13, 2024
2759910
chore: Added next backend url in .env.example
rajdip-b Jul 16, 2024
4bd12f0
feat(platform): Add warning sonner toast for invalid otp (#335)
PriyobrotoKar Jul 17, 2024
7b210ed
docs: Update postman workspace link
rajdip-b Jul 17, 2024
798cd7b
feat(cli): Improved the DX for list profile (#334)
kriptonian1 Jul 17, 2024
391d7dc
chore: Removed Minio config
rajdip-b Jul 18, 2024
581629d
cli(fix): Fixed run command not working
rajdip-b Jul 18, 2024
77f05f3
chore(api): Minor updates to user service
rajdip-b Jul 20, 2024
5512f8f
docs: Updated env and cli docs
rajdip-b Jul 22, 2024
eb271d4
chore(ci): Disabled platform and api deployments
rajdip-b Jul 26, 2024
ba23183
chore(ci): Adding validate pipeline (#372)
DhairyaMajmudar Jul 27, 2024
898e9c2
chore(ci): Add validate CLI pipeline (#373)
DhairyaMajmudar Jul 27, 2024
92daef9
refactor(api): Updated path of some endpoints in project controller
rajdip-b Jul 27, 2024
2f0a21d
chore(api): Fixed naming error in variable controller
rajdip-b Jul 27, 2024
116aa88
fix(platform): Platform types fixes (#374)
DhairyaMajmudar Jul 27, 2024
d7d0190
chore(api-client): Fixed test script
rajdip-b Jul 27, 2024
6ce7865
chore(api-client): Removed try-catch from tests in environment
rajdip-b Jul 27, 2024
90b2e14
feat(api): Create a paginate method (#379)
muntaxir4 Jul 27, 2024
28e62f8
chore(api): Improve handling of edge cases for paginate module (#402)
muntaxir4 Jul 29, 2024
8eff42f
chore(api-client): Added pagination structure
rajdip-b Jul 29, 2024
a055701
chore(ci): Update auto-assign.yaml (#375)
DhairyaMajmudar Jul 29, 2024
cf6a125
chore(api): Skip workspace creation when user is admin (#376)
DhairyaMajmudar Jul 29, 2024
01a56e2
chore(ci): Add docker check (#383)
DhairyaMajmudar Jul 29, 2024
d4be243
feat(api): Add pagination metadata to Project module (#393)
muntaxir4 Jul 29, 2024
8ad6932
feat(api): Add pagination metadata to Integration module (#391)
muntaxir4 Jul 29, 2024
7207952
feat(api): Add pagination metadata to Variable module (#390)
muntaxir4 Jul 29, 2024
5959df4
chore(api): Add user cache for optimization (#386)
Z-xus Jul 29, 2024
150e23d
feat(api): Add pagination metadata to Secret module (#389)
muntaxir4 Jul 29, 2024
f62252a
feat(api): Add pagination metadata to Workspace Role module (#388)
muntaxir4 Jul 29, 2024
b66fe78
feat(api): Add pagination metadata to Workspace module (#387)
muntaxir4 Jul 29, 2024
b13c50f
feat(api): Add pagination metadata to Event module (#394)
muntaxir4 Jul 29, 2024
2e3a1af
fix(cli): Added parent directory check (#359)
Princeyadav05 Jul 29, 2024
a495914
chore(cli): Changed objects to classes (#306)
vr-varad Jul 29, 2024
1df4469
feat(api): Create endpoint for fetching all revisions of a secret (#303)
anudeeps352 Jul 29, 2024
13ebc0d
feat(api): Create endpoint for fetching all revisions of a variable (…
yogesh1801 Jul 29, 2024
9eb5c5c
feat(api): Add pagination metadata to Environment module (#382)
muntaxir4 Jul 29, 2024
0c1a5ca
chore(release): 2.3.0 [skip ci]
semantic-release-bot Jul 29, 2024
8eba65a
refactor(api): Update logic for forking projects (#398)
Dark-Kernel Jul 29, 2024
fedc43b
feat(cli): Quit on decryption failure (#381)
Dark-Kernel Jul 29, 2024
936d9d9
fix(cli): Fixed missing module
rajdip-b Jul 31, 2024
28f2dbb
chore: Add api client build script and updated CI
rajdip-b Jul 31, 2024
e28748f
chore(ci): Update CLI CI name
rajdip-b Jul 31, 2024
a26f7c1
feat(cli): Add functionality to operate on Environments (#324)
vr-varad Jul 31, 2024
db5bd4f
feat(api): Add max page size (#377)
DhairyaMajmudar Aug 1, 2024
a31e151
feat(cli): Add release pipeline (#297)
Kiranchaudhary537 Aug 2, 2024
9b844b8
feat(api-client): Create controller for Secret module (#396)
vr-varad Aug 3, 2024
6bb71a6
feat(api-client): Create controller for Event module (#399)
vr-varad Aug 3, 2024
c7860b7
chore: Fixed api client tests and rearranged controllers
rajdip-b Aug 3, 2024
dcbac1f
fix(api-client): Fixed broken export
rajdip-b Aug 3, 2024
ce16b14
feat(api-client): Create controller for Integration module (#397)
vr-varad Aug 9, 2024
480376d
refactor & resolve bugs
Kiranchaudhary537 Aug 15, 2024
3a06eaa
Merge branch 'keyshade-xyz:develop' into develop
Kiranchaudhary537 Aug 15, 2024
145de01
updated path
Kiranchaudhary537 Aug 15, 2024
93e7506
added pnpm cache
Kiranchaudhary537 Aug 15, 2024
03d8570
CLI: Add release pipeline
Kiranchaudhary537 Oct 13, 2024
ffe6761
feat(api-client): Create controller for Variable module (#395)
vr-varad Aug 16, 2024
97bb7f3
fix(api): Add NotFound exception on passing an invalid roleId while i…
PriyobrotoKar Aug 17, 2024
1be10d8
fix(platform): Build failure in platform (#385)
DhairyaMajmudar Aug 24, 2024
11abd1f
feat(api-client): Create controller for Project module (#370)
vr-varad Aug 24, 2024
17dd77c
chore: Housekeeping
rajdip-b Sep 1, 2024
2d85675
added mulitple authorities checklist
anaskhan28 Jul 28, 2024
11e7685
refactored tests
rajdip-b Sep 1, 2024
f38b6eb
finishing touches
rajdip-b Sep 1, 2024
70b8fab
chore(cli): Add Zod validation to parseInput function (#362)
sujal-sakpal Sep 4, 2024
63644ee
feat(api): Add global search in workspace
rajdip-b Sep 5, 2024
02bff89
chore(api): Reorganized import using path alias
rajdip-b Sep 5, 2024
36e18ec
chore(web): Added strict null check
rajdip-b Sep 5, 2024
d9def10
chore(platform): Added strict null check
rajdip-b Sep 5, 2024
4eb739c
chore(release): 2.4.0 [skip ci]
semantic-release-bot Sep 5, 2024
651e4cd
docs: Updated Postman links
rajdip-b Sep 5, 2024
c7caf65
feat(schema): Added a schema package
rajdip-b Sep 5, 2024
31b4ca8
docs: Fixed minor typo in postman workspace link (#411)
unamdev0 Sep 5, 2024
96ca3cc
refactor(platform): added optional chaining due to strict null check …
unamdev0 Sep 7, 2024
27e9a66
feat(api): Included default workspace details in getSelf function (#414)
unamdev0 Sep 9, 2024
ef3703d
feat(api): Add slug in entities (#415)
rajdip-b Sep 9, 2024
5350dbf
fix(api): Error messages fixed in api-key service (#418)
Nil2000 Sep 10, 2024
c28ee20
refactor(API): Refactor workspace-membership into a separate module (…
unamdev0 Sep 11, 2024
e2d0e30
chore(api): Suppressed version check test in secret
rajdip-b Sep 12, 2024
b48b5a7
feat(platform): Add loading skeleton in the secrets page (#423)
PriyobrotoKar Sep 13, 2024
fc5d8f2
feat(api-client): Added workspace controller (#427)
rajdip-b Sep 14, 2024
88e26f2
feat(api-client): Added workspace role controller (#430)
rajdip-b Sep 14, 2024
1b6f6fb
chore(api): Update slug generation method (#420)
Nil2000 Sep 14, 2024
0479bd0
feat(api-client): Synced with latest API
rajdip-b Sep 15, 2024
06968a2
feat(web): Update about and careers page
rajdip-b Sep 15, 2024
3c1674c
chore(release): 2.5.0 [skip ci]
semantic-release-bot Sep 16, 2024
0d09900
feat(api): Fetch total count of environments, secrets and variables i…
unamdev0 Sep 16, 2024
7f73e9e
feat(api): Add icon and remove description field from workspace (#435)
unamdev0 Sep 16, 2024
2784bdf
chore(api): Optimise API docker image size (#360)
kriptonian1 Sep 16, 2024
3c81364
feat(api): Add prod env schema in env file (#436)
unamdev0 Sep 16, 2024
4f0ab2c
feat(api): Replace `projectId` with `name` and `slug` in workspace-ro…
Nil2000 Sep 17, 2024
b0ea773
feat(cli): Secret scan (#438)
Sambit003 Sep 17, 2024
c8fb2d2
feat(cli): Add workspace operations (#441)
rajdip-b Sep 17, 2024
4ee2cfd
fix(web): Horizontal Scrolling issue on the website (#440)
Samaresh-Das Sep 18, 2024
cac881b
fix: resolve footer website name cut-off or overlap issue (#444)
m7md-Y-3mra Sep 18, 2024
dad42c5
chore: Updated scripts
rajdip-b Sep 18, 2024
0dc410e
chore: Minor changes to variables
rajdip-b Sep 18, 2024
ec26c0b
feat: Remove project IDs from workspace role export data and update t…
Meeran-Tofiq Sep 18, 2024
0a7b2e4
fix(platform): Fixed duplicate Google Logo UI fix (#450)
prabuddha369 Sep 19, 2024
a649b73
feat(api-client): Added workspace-membership and related tests (#452)
Nil2000 Sep 20, 2024
827617f
feat(cli): Add project command (#451)
rajdip-b Sep 21, 2024
ad48593
docs: Updated CLI docs (#460)
rajdip-b Sep 21, 2024
2ec6577
feat(cli): Implemented pagination support (#453)
Nil2000 Sep 21, 2024
0cb3998
fix(api): Replace the id with slug in the global-search service (#455)
PriyobrotoKar Sep 22, 2024
d023e44
docs: Add documentation for scan in CLI (#461)
Allan2000-Git Sep 23, 2024
16e6157
docs: Add documentation for environment in CLI (#462)
Allan2000-Git Sep 24, 2024
51e2f81
docs: Add documentation for project in CLI (#466)
Allan2000-Git Sep 25, 2024
b07805d
docs: Add documentation for workspace command (#464)
YuvalBubnovsky Sep 25, 2024
b09f68f
docs: Added docker support documentation (#465)
YuvalBubnovsky Sep 29, 2024
b3cf943
docs: Added missing mappings to pages
rajdip-b Oct 1, 2024
b2d4a37
chore: Add more logging to Sentry init (#470)
YuvalBubnovsky Oct 1, 2024
6358ab1
feat(cli): implement commands to get, list, update, and delete, works…
Meeran-Tofiq Oct 1, 2024
8ae0c38
docs: Added documentation for running the platform (#473)
Allan2000-Git Oct 3, 2024
a68596e
chore(cli): Update controller invocation in environment commands (#477)
bansal-harsh-2504 Oct 7, 2024
0328a9b
feat(platform): Clearing email field after waitlisting the user email…
bansal-harsh-2504 Oct 9, 2024
b94648c
feat(api-client): Create controller for User module (#484)
anudeeps352 Oct 13, 2024
2b39ab0
feat(api): Add resend otp implementation (#445)
Prakhargarg-2010196 Oct 13, 2024
4160e2d
chore: Update .env.example
rajdip-b Oct 13, 2024
29f052d
feat(cli): Update environment command outputs
rajdip-b Oct 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 17 additions & 10 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ DATABASE_URL=postgresql://postgres:[email protected]:5432/keyshade_db
[email protected]

REDIS_URL=redis://127.0.0.1:6379
REDIS_PASSWORD=

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
Expand All @@ -18,11 +17,11 @@ GITLAB_CLIENT_ID=
GITLAB_CLIENT_SECRET=
GITLAB_CALLBACK_URL=

SENTRY_DSN=
SENTRY_DSN=https://example.com
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_TRACES_SAMPLE_RATE=
SENTRY_PROFILES_SAMPLE_RATE=
SENTRY_TRACES_SAMPLE_RATE=1.0
SENTRY_PROFILES_SAMPLE_RATE=1.0
SENTRY_ENV=

SMTP_HOST=
Expand All @@ -31,12 +30,12 @@ SMTP_EMAIL_ADDRESS=
SMTP_PASSWORD=
FROM_EMAIL="your-name <[email protected]>"

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>
MINIO_ENDPOINT=
MINIO_PORT=
MINIO_ACCESS_KEY=
MINIO_SECRET_KEY=
MINIO_USE_SSL=
MINIO_BUCKET_NAME=

JWT_SECRET=secret

Expand All @@ -47,3 +46,11 @@ PLATFORM_OAUTH_FAILURE_REDIRECT_PATH=/oauth/failure

DOMAIN=localhost
FEEDBACK_FORWARD_EMAIL=

BACKEND_URL=http://localhost:4200
NEXT_PUBLIC_BACKEND_URL=http://localhost:4200

NODE_ENV=dev

THROTTLE_TTL=60
THROTTLE_LIMIT=5
44 changes: 40 additions & 4 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,64 @@ jobs:
const comment = context.payload.comment;
const issue = context.issue;
const owner = "keyshade-xyz";
const repo = "keyshade"
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",
});
}
}
}

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 you!'
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.',
});
}
}
94 changes: 94 additions & 0 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Deploy API

on:
workflow_dispatch:
push:
branches:
- main
paths: ['apps/api/**', '.github/workflows/deploy-api.yml', 'package.json']

jobs:
build:
runs-on: ubuntu-latest
environment: alpha
name: Build and push API docker image for release

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: 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

# setup-database:
# needs: build
# name: Setup Database
# runs-on: ubuntu-latest
# environment: alpha

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

# - 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: 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

# 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: 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
54 changes: 54 additions & 0 deletions .github/workflows/deploy-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy CLI

on:
push:
branches:
- 'main'
paths: ['apps/cli/**','.github/workflows/deploy-cli.yml']

jobs:
deploy:
runs-on: ubuntu-latest
environment: alpha
name: Build and push Web docker image for release
if: github.event.ref == 'refs/heads/main'


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

- 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: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build:cli

- name: Publish to NPM
Kiranchaudhary537 marked this conversation as resolved.
Show resolved Hide resolved
run: pnpm run publish:cli
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
73 changes: 73 additions & 0 deletions .github/workflows/deploy-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Deploy Platform

on:
workflow_dispatch:
push:
branches:
- main
paths:
[
'apps/platform/**',
'.github/workflows/deploy-platform.yml',
'package.json'
]

jobs:
build:
runs-on: ubuntu-latest
environment: alpha
name: Build and push Platform docker image for release

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: 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

# deploy:
# needs: build
# runs-on: ubuntu-latest
# environment: alpha
# name: Deploy Platform docker image for release

# 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: 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
Loading