-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into illiar/feat/collection-flow-customization
- Loading branch information
Showing
799 changed files
with
29,340 additions
and
4,099 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
name: Database Operations | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: 'Choose Environment' | ||
required: true | ||
default: 'dev' | ||
options: | ||
- 'dev' | ||
- 'sb' | ||
- 'prod' | ||
tag: | ||
type: string | ||
description: 'Image Tag' | ||
required: true | ||
default: '' | ||
|
||
workflow_call: | ||
inputs: | ||
environment: | ||
type: string | ||
description: 'Environment' | ||
required: true | ||
default: 'dev' | ||
tag: | ||
type: string | ||
description: 'Image Tag' | ||
required: true | ||
default: '' | ||
# workflow_dispatch: | ||
# inputs: | ||
# environment: | ||
# description: 'Select environment' | ||
# type: choice | ||
# options: | ||
# - dev | ||
# - sb | ||
# - prod | ||
# required: true | ||
# data-sync: | ||
# description: 'Run data sync' | ||
# type: boolean | ||
# default: false | ||
# data-migration: | ||
# description: 'Run data migration' | ||
# type: boolean | ||
# default: false | ||
# prisma-migration: | ||
# description: 'Run Prisma migration' | ||
# type: boolean | ||
# default: false | ||
|
||
jobs: | ||
# database-ops: | ||
# runs-on: ubuntu-latest | ||
|
||
# environment: ${{ github.event.inputs.environment }} | ||
|
||
# permissions: | ||
# id-token: write | ||
# contents: read | ||
|
||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Install pnpm | ||
# uses: pnpm/action-setup@v2 | ||
# with: | ||
# version: 8 | ||
# run_install: false | ||
|
||
# - name: Install Node.js | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version-file: ".nvmrc" | ||
# registry-url: https://registry.npmjs.org | ||
# cache: 'pnpm' | ||
|
||
# - name: Configure AWS Credentials | ||
# uses: aws-actions/configure-aws-credentials@v4 | ||
# with: | ||
# aws-region: ${{ secrets.AWS_REGION }} | ||
# role-to-assume: ${{ secrets.AWS_IAM_ROLE }} | ||
# role-session-name: MySessionName | ||
# role-duration-seconds: 300 | ||
|
||
# - name: Get secrets | ||
# uses: aws-actions/aws-secretsmanager-get-secrets@v2 | ||
# with: | ||
# secret-ids: ${{ secrets.AWS_SECRET_MANAGER_WORKFLOW_NAME }} | ||
|
||
# - name: Setup Twingate | ||
# uses: twingate/github-action@v1 | ||
# with: | ||
# service-key: ${{ secrets.TWINGATE_SERVICE_KEY_SECRET_NAME }} | ||
|
||
# - name: Install dependencies | ||
# run: npm install --legacy-peer-deps | ||
|
||
# - name: Run Data Sync | ||
# if: ${{ github.event.inputs.data-sync == 'true' }} | ||
# run: dumb-init npm run db:data-sync | ||
# env: | ||
# NODE_ENV: ${{ github.event.inputs.environment }} | ||
|
||
# - name: Run Data Migration | ||
# if: ${{ github.event.inputs.data-migration == 'true' }} | ||
# run: dumb-init npm run db:data-migration:migrate | ||
# env: | ||
# NODE_ENV: ${{ github.event.inputs.environment }} | ||
|
||
# - name: Run Prisma Migration | ||
# if: ${{ github.event.inputs.prisma-migration == 'true' }} | ||
# run: dumb-init npm run db:migrate-up | ||
# env: | ||
# NODE_ENV: ${{ github.event.inputs.environment }} | ||
|
||
update-helm-chart: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Checkout cloud-infra-config repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ballerine-io/cloud-infra-config | ||
token: ${{ secrets.GIT_TOKEN }} | ||
ref: main | ||
fetch-depth: 1 | ||
sparse-checkout: | | ||
kubernetes/helm/wf-service | ||
sparse-checkout-cone-mode: true | ||
- name: Check if values yaml file exists | ||
id: update_helm_check | ||
shell: bash | ||
run: | | ||
if [ -f "kubernetes/helm/wf-service/${{ github.event.inputs.environment }}-custom-values.yaml" ]; then | ||
echo "file_name=${{ github.event.inputs.environment }}-custom-values.yaml" >> "$GITHUB_OUTPUT" | ||
elif [ "${{ github.event.inputs.environment }}" == "dev" ]; then | ||
echo "file_name=dev-custom-values.yaml" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "skip_helm=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Update workflow-service image version in the HelmChart | ||
if: ${{ steps.update_helm_check.outputs.skip_helm != 'true' }} | ||
uses: fjogeleit/yaml-update-action@main | ||
with: | ||
repository: ballerine-io/cloud-infra-config | ||
branch: main | ||
commitChange: true | ||
message: 'Update wf-service image Version to ${{ github.event.inputs.tag }} - (Commit hash: ${{ github.sha }}, commit message: ${{ github.event.head_commit.message }})' | ||
token: ${{ secrets.GIT_TOKEN }} | ||
changes: | | ||
{ | ||
"kubernetes/helm/wf-service/${{steps.update_helm_check.outputs.file_name}}": { | ||
"prismaMigrate.image.tag": "${{ github.event.inputs.tag }}", | ||
"dbMigrate.image.tag": "${{ github.event.inputs.tag }}", | ||
"dbSync.image.tag": "${{ github.event.inputs.tag }}", | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Publish workflows-service image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
type: choice | ||
description: 'Choose Environment' | ||
required: true | ||
default: 'dev' | ||
options: | ||
- 'dev' | ||
- 'sb' | ||
- 'prod' | ||
tag: | ||
type: string | ||
description: 'Image Tag' | ||
required: true | ||
default: '' | ||
|
||
workflow_call: | ||
inputs: | ||
environment: | ||
type: string | ||
description: 'Environment' | ||
required: true | ||
default: 'dev' | ||
tag: | ||
type: string | ||
description: 'Image Tag' | ||
required: true | ||
default: '' | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository_owner }}/workflows-service | ||
|
||
jobs: | ||
update-helm-chart: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Checkout cloud-infra-config repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ballerine-io/cloud-infra-config | ||
token: ${{ secrets.GIT_TOKEN }} | ||
ref: main | ||
fetch-depth: 1 | ||
sparse-checkout: | | ||
kubernetes/helm/wf-service | ||
sparse-checkout-cone-mode: true | ||
- name: Check if values yaml file exists | ||
id: update_helm_check | ||
shell: bash | ||
run: | | ||
if [ -f "kubernetes/helm/wf-service/${{ github.event.inputs.environment }}-custom-values.yaml" ]; then | ||
echo "file_name=${{ github.event.inputs.environment }}-custom-values.yaml" >> "$GITHUB_OUTPUT" | ||
elif [ "${{ github.event.inputs.environment }}" == "dev" ]; then | ||
echo "file_name=dev-custom-values.yaml" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "skip_helm=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Update workflow-service image version in the HelmChart | ||
if: ${{ steps.update_helm_check.outputs.skip_helm != 'true' }} | ||
uses: fjogeleit/yaml-update-action@main | ||
with: | ||
repository: ballerine-io/cloud-infra-config | ||
branch: main | ||
commitChange: true | ||
message: 'Update wf-service image Version to ${{ github.event.inputs.tag }} - (Commit hash: ${{ github.sha }}, commit message: ${{ github.event.head_commit.message }})' | ||
token: ${{ secrets.GIT_TOKEN }} | ||
changes: | | ||
{ | ||
"kubernetes/helm/wf-service/${{steps.update_helm_check.outputs.file_name}}": { | ||
"image.tag": "${{ github.event.inputs.tag }}", | ||
"prismaMigrate.image.tag": "${{ github.event.inputs.tag }}", | ||
"dbMigrate.image.tag": "${{ github.event.inputs.tag }}", | ||
"dbSync.image.tag": "${{ github.event.inputs.tag }}", | ||
} | ||
} |
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
Oops, something went wrong.