-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from SolaceProducts/crushton/update_deploy_im…
…age_non_dev Pull a certain image tag when going to anywhere but dev
- Loading branch information
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
workflow_dispatch: | ||
inputs: | ||
releaseVersion: | ||
description: "The tag of the image to push. We'll pull the main image and re-tag it with this." | ||
description: "The tag of the image to push. For dev, we'll pull the 'main' image and for all other environments, we'll pull image A.B.C, then we push the image with tag A.B.C to where it needs to go." | ||
required: true | ||
default: "A.B.C" | ||
deployEnvironment: | ||
|
@@ -29,11 +29,18 @@ jobs: | |
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/[email protected] | ||
- name: ECR (Dev) - Pull Image | ||
- name: ECR (Dev) - Pull Main Image | ||
if: ${{ github.event.inputs.deployEnvironment == 'development' }} | ||
run: | | ||
ECR_DEV_IMAGE="${{ steps.login-ecr.outputs.registry }}/${{ github.event.repository.name }}:main" | ||
docker pull $ECR_DEV_IMAGE | ||
echo "ECR_DEV_IMAGE=$ECR_DEV_IMAGE" >> $GITHUB_ENV | ||
- name: ECR (Dev) - Pull Prod Ready Image Tag | ||
if: ${{ github.event.inputs.deployEnvironment != 'development' }} | ||
run: | | ||
ECR_DEV_IMAGE="${{ steps.login-ecr.outputs.registry }}/${{ github.event.repository.name }}:${{ github.event.inputs.releaseVersion }}" | ||
docker pull $ECR_DEV_IMAGE | ||
echo "ECR_DEV_IMAGE=$ECR_DEV_IMAGE" >> $GITHUB_ENV | ||
- name: GCR (Dev) - Login | ||
if: ${{ github.event.inputs.deployEnvironment == 'development' }} | ||
uses: docker/login-action@v3 | ||
|