From 8593f3e0219b8284d681c74d087eebff888319ed Mon Sep 17 00:00:00 2001 From: Aravind Kannan Rathinasabapathi Date: Thu, 25 Apr 2024 10:28:03 +0530 Subject: [PATCH 1/2] :wrench: chore: use ECR_PUSH_USER instead of STAGING prefix --- .github/workflows/build-and-push.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 47be23f7..5d854c91 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -3,12 +3,13 @@ name: Build and Push Image on: workflow_dispatch: push: - branches: [ "main" ] + branches: [ "main", "release" ] + pull_request: env: - AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} - AWS_REGION: ${{ secrets.STAGING_AWS_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.ECR_PUSH_USER_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_PUSH_USER_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.ECR_PUSH_USER_AWS_REGION }} jobs: start-runner: @@ -72,9 +73,9 @@ jobs: if: ${{ !startsWith(github.ref, 'refs/pull/') }} shell: bash env: - aws_access_key_id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} - aws_region: ${{ secrets.STAGING_AWS_REGION }} + aws_access_key_id: ${{ secrets.ECR_PUSH_USER_AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.ECR_PUSH_USER_AWS_SECRET_ACCESS_KEY }} + aws_region: ${{ secrets.ECR_PUSH_USER_AWS_REGION }} run: | sudo apt-get update && sudo apt-get -y install awscli aws configure set aws_access_key_id $aws_access_key_id From 7b6f4f1ebe5a0d98b2f627c221462d9c33c2f069 Mon Sep 17 00:00:00 2001 From: Aravind Kannan Rathinasabapathi Date: Thu, 25 Apr 2024 12:45:40 +0530 Subject: [PATCH 2/2] :wrench: chore: change trigger points for workflows --- .github/workflows/build-and-push.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 5d854c91..5a4fc07d 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -4,7 +4,6 @@ on: workflow_dispatch: push: branches: [ "main", "release" ] - pull_request: env: AWS_ACCESS_KEY_ID: ${{ secrets.ECR_PUSH_USER_AWS_ACCESS_KEY_ID }}