Skip to content

Commit

Permalink
Minor modification to the deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bhvishal9 committed Aug 21, 2024
1 parent 4a79e02 commit 8da07dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
uses: ./.github/workflows/helpers-deploy-argo.yaml
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
ECR_ROLE_ARN: ${{ github.ref == 'refs/heads/production' && secrets.PRODUCTION_ECR_ROLE_ARN || secrets.STAGING_ECR_ROLE_ARN }}
10 changes: 5 additions & 5 deletions .github/workflows/helpers-build-docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
description: The AWS region to use for ECR
required: false
type: string
aws-role-arn:
description: The AWS role to assume for ECR
required: true
type: string
docker_file_path:
description: >
"The path to the Dockerfile to use for building the image. For example:
Expand All @@ -30,6 +26,10 @@ on:
description: The platforms to build for
required: false
type: string
secrets:
ECR_ROLE_ARN:
description: The ECR role ARN
required: true
outputs:
image-tag:
description: The docker image tag
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ inputs.aws-region }}
role-to-assume: ${{ inputs.aws-role-arn }}
role-to-assume: ${{ secrets.ECR_ROLE_ARN }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/helpers-deploy-argo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ name: helpers-deploy-argo

on:
workflow_call:
inputs:
aws-role-arn:
description: "The AWS role to assume for ECR"
required: true
type: string
secrets:
GH_PAT:
description: "The GitHub Personal Access Token to use for checking out the helm-config repository"
required: true
ECR_ROLE_ARN:
description: "The ECR role ARN"
required: true

permissions:
contents: write
Expand All @@ -20,8 +28,8 @@ jobs:
uses: ./.github/workflows/helpers-build-docker-image.yaml
name: Build Docker image
with:
aws-role-arn: ${{ github.ref == 'refs/heads/production' && vars.PRODUCTION_ECR_ROLE_ARN || vars.STAGING_ECR_ROLE_ARN }}
docker_file_path: Dockerfile
secrets: inherit

update-helm-values:
name: Update Helm values
Expand Down

0 comments on commit 8da07dc

Please sign in to comment.