Skip to content

Commit

Permalink
Remove inputs and pull vars from respective environements
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdawson1982 committed Jun 13, 2024
1 parent c008389 commit 480cf58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/deploy-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
description: "which environment to deploy to"
required: true
type: string
ecr_repository:
description: "ecr repo to hold container image"
required: true
type: string
ecr_region:
description: "ecr region to hold container image"
required: true
type: string
secrets:
kube_namespace:
description: "the kubernetes namespace to deploy to"
Expand Down Expand Up @@ -58,7 +50,7 @@ jobs:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }}
aws-region: ${{ inputs.ECR_REGION }}
aws-region: ${{ vars.ECR_REGION }}

- name: Login to ECR
id: login-to-ecr
Expand All @@ -68,15 +60,15 @@ jobs:
id: build-docker-image
env:
REGISTRY: ${{ steps.login-to-ecr.outputs.registry }}
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
REPOSITORY: ${{ vars.ECR_REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
run: docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG .

- name: Push Docker image to ECR
id: push-docker-image-to-ecr
env:
REGISTRY: ${{ steps.login-to-ecr.outputs.registry }}
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
REPOSITORY: ${{ vars.ECR_REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
run: docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG

Expand All @@ -93,7 +85,7 @@ jobs:
CATALOGUE_TOKEN: ${{ secrets.CATALOGUE_TOKEN }}
IMAGE_TAG: ${{ github.sha }}
REGISTRY: ${{ steps.login-to-ecr.outputs.registry }}
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
REPOSITORY: ${{ vars.ECR_REPOSITORY }}
NAMESPACE: ${{ secrets.KUBE_NAMESPACE }}
ENABLE_ANALYTICS: ${{ vars.ENABLE_ANALYTICS }}
ANALYTICS_ID: ${{ vars.ANALYTICS_ID }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ jobs:
uses: "./.github/workflows/deploy-generic.yml"
with:
env: "dev"
ecr_repository: ${{ vars.DEV_ECR_REPOSITORY }}
ecr_region: ${{ vars.DEV_ECR_REGION }}
secrets:
kube_namespace: ${{ secrets.KUBE_NAMESPACE }}
kube_cert: ${{ secrets.KUBE_CERT }}
Expand All @@ -28,8 +26,6 @@ jobs:
needs: dev
with:
env: "test"
ecr_repository: ${{ vars.TEST_ECR_REPOSITORY }}
ecr_region: ${{ vars.TEST_ECR_REGION }}
secrets:
kube_namespace: ${{ secrets.KUBE_NAMESPACE }}
kube_cert: ${{ secrets.KUBE_CERT }}
Expand All @@ -46,8 +42,6 @@ jobs:
needs: test
with:
env: "preprod"
ecr_repository: ${{ vars.PREPROD_ECR_REPOSITORY }}
ecr_region: ${{ vars.PREPROD_ECR_REGION }}
secrets:
kube_namespace: ${{ secrets.KUBE_NAMESPACE }}
kube_cert: ${{ secrets.KUBE_CERT }}
Expand Down

0 comments on commit 480cf58

Please sign in to comment.