Skip to content

Commit

Permalink
Update workflow variable assignments (#431)
Browse files Browse the repository at this point in the history
* add replaces vars with inputs

* Remove inputs and pull vars from respective environements
  • Loading branch information
mitchdawson1982 authored Jun 13, 2024
1 parent ac06b6c commit 89cbd60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
14 changes: 3 additions & 11 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 @@ -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
2 changes: 0 additions & 2 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,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 Down

0 comments on commit 89cbd60

Please sign in to comment.