Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow variable assignments #431

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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