From 88c912901629fb7c669ef3d5f437e51719a51b10 Mon Sep 17 00:00:00 2001 From: Ajinkya Date: Thu, 2 Jan 2025 15:09:34 +0530 Subject: [PATCH] fixed merge conflicts in staging and prod workflows --- .github/workflows/prod.yml | 21 +++++++++++++++------ .github/workflows/staging.yml | 20 ++++++++++++++++---- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml index d62cdbc6a7..b343f26318 100644 --- a/.github/workflows/prod.yml +++ b/.github/workflows/prod.yml @@ -23,10 +23,15 @@ on: type: boolean default: true description: Internal - protection: + threat_detection: type: boolean default: true - description: Protection + description: Threat Detection Client + + threat_detection_backend: + type: boolean + default: true + description: Threat Deteection Backend # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -122,10 +127,14 @@ jobs: echo "::set-output name=image::$ECR_REGISTRY/akto-internal:$IMAGE_TAG" fi - if [[ "${{ github.event.inputs.protection }}" == "true" ]]; then - cd apps/api-threat-detection - docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-protection:$IMAGE_TAG_1 -t $ECR_REGISTRY/akto-api-protection:$IMAGE_TAG_2 -t $ECR_REGISTRY/akto-api-protection:$IMAGE_TAG_3 . --push - echo "::set-output name=image::$ECR_REGISTRY/akto-api-protection:$IMAGE_TAG" + if [[ "${{ github.event.inputs.threat_detection}}" == "true" ]]; then + cd apps/threat-detection + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-threat-detection:$IMAGE_TAG . --push + fi + + if [[ "${{ github.event.inputs.threat_detection_backend}}" == "true" ]]; then + cd ../threat-detection-backend + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-threat-detection-backend:$IMAGE_TAG . --push fi - name: Configure AWS Credentials for ECR uses: aws-actions/configure-aws-credentials@v1 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6bb9697195..0266cf4bd0 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -3,7 +3,7 @@ name: Staging # Controls when the workflow will run on: push: - branches: [ master ] + branches: [master] pull_request: workflow_dispatch: @@ -25,7 +25,7 @@ jobs: architecture: x64 - uses: actions/setup-node@v2 with: - node-version: '17' + node-version: "17" - uses: bufbuild/buf-action@v1 with: setup_only: true @@ -41,7 +41,7 @@ jobs: wget -O general.json https://raw.githubusercontent.com/akto-api-security/pii-types/master/general.json wget -O fintech.json https://raw.githubusercontent.com/akto-api-security/akto/master/pii-types/fintech.json wget -O filetypes.json https://raw.githubusercontent.com/akto-api-security/akto/master/pii-types/filetypes.json - + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -69,7 +69,19 @@ jobs: echo $IMAGE_TAG >> $GITHUB_STEP_SUMMARY docker buildx create --use # Build a docker container and push it to DockerHub - cd apps/threat-detection + cd apps/dashboard + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY-dashboard:$IMAGE_TAG $IMAGE_TAG_DASHBOARD . --push + cd ../testing + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing:$IMAGE_TAG $IMAGE_TAG_TESTING . --push + cd ../testing-cli + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-api-testing-cli:$IMAGE_TAG $IMAGE_TAG_TESTING_CLI . --push + cd ../billing + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-billing:$IMAGE_TAG . --push + cd ../internal + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-internal:$IMAGE_TAG . --push + cd ../source-code-analyser + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/source-code-analyser:$IMAGE_TAG . --push + cd ../threat-detection docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-threat-detection:$IMAGE_TAG . --push cd ../threat-detection-backend docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/akto-threat-detection-backend:$IMAGE_TAG . --push