mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 13:27:22 +00:00
combine migration job with deploy
This commit is contained in:
@@ -52,7 +52,7 @@ jobs:
|
|||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}
|
||||||
|
|
||||||
gamma-postgres-migration:
|
gamma-deployment:
|
||||||
name: Run latest migration in gamma
|
name: Run latest migration in gamma
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [infisical-image]
|
needs: [infisical-image]
|
||||||
@@ -72,22 +72,13 @@ jobs:
|
|||||||
cd backend
|
cd backend
|
||||||
npm install
|
npm install
|
||||||
npm run migration:latest
|
npm run migration:latest
|
||||||
gamma-deployment:
|
|
||||||
name: Deploy to gamma stage
|
- name: Configure AWS Credentials
|
||||||
runs-on: ubuntu-latest
|
uses: aws-actions/configure-aws-credentials@v4
|
||||||
needs: [gamma-postgres-migration]
|
with:
|
||||||
environment:
|
audience: sts.amazonaws.com
|
||||||
name: Gamma
|
aws-region: us-east-1
|
||||||
url: https://gamma.infisical.com
|
role-to-assume: arn:aws:iam::135906656851:role/github-action-deploy-prod
|
||||||
steps:
|
|
||||||
- name: ☁️ Checkout source
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v4
|
|
||||||
with:
|
|
||||||
audience: sts.amazonaws.com
|
|
||||||
aws-region: us-east-1
|
|
||||||
role-to-assume: arn:aws:iam::135906656851:role/github-action-deploy-prod
|
|
||||||
- name: Save commit hashes for tag
|
- name: Save commit hashes for tag
|
||||||
id: commit
|
id: commit
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
uses: pr-mpt/actions-commit-hash@v2
|
||||||
@@ -130,22 +121,12 @@ jobs:
|
|||||||
cd backend
|
cd backend
|
||||||
npm install
|
npm install
|
||||||
npm run migration:latest
|
npm run migration:latest
|
||||||
prod-deployment:
|
- name: Configure AWS Credentials
|
||||||
name: Deploy to production stage
|
uses: aws-actions/configure-aws-credentials@v4
|
||||||
runs-on: ubuntu-latest
|
with:
|
||||||
needs: [production-postgres-migration]
|
audience: sts.amazonaws.com
|
||||||
environment:
|
aws-region: us-east-1
|
||||||
name: Production
|
role-to-assume: arn:aws:iam::135906656851:role/github-action-deploy-prod
|
||||||
url: https://app.infisical.com
|
|
||||||
steps:
|
|
||||||
- name: ☁️ Checkout source
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v4
|
|
||||||
with:
|
|
||||||
audience: sts.amazonaws.com
|
|
||||||
aws-region: us-east-1
|
|
||||||
role-to-assume: arn:aws:iam::135906656851:role/github-action-deploy-prod
|
|
||||||
- name: Save commit hashes for tag
|
- name: Save commit hashes for tag
|
||||||
id: commit
|
id: commit
|
||||||
uses: pr-mpt/actions-commit-hash@v2
|
uses: pr-mpt/actions-commit-hash@v2
|
||||||
@@ -166,4 +147,4 @@ jobs:
|
|||||||
task-definition: ${{ steps.render-web-container.outputs.task-definition }}
|
task-definition: ${{ steps.render-web-container.outputs.task-definition }}
|
||||||
service: infisical-prod-platform
|
service: infisical-prod-platform
|
||||||
cluster: infisical-prod-platform
|
cluster: infisical-prod-platform
|
||||||
wait-for-service-stability: true
|
wait-for-service-stability: true
|
||||||
|
|||||||
Reference in New Issue
Block a user