Skip to content

Commit ff3ab72

Browse files
committed
removed stage and prod promote steps
1 parent 9222436 commit ff3ab72

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

.github/workflows/build-docker-push-to-ecr.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,11 @@ jobs:
4646
- name: Login to AWS ECR
4747
id: login-ecr
4848
uses: aws-actions/amazon-ecr-login@v1
49-
- name: Build and push dev image
50-
if: ${{ inputs.ENVIRONMENT }} == 'dev'
49+
- name: Build and push ${{ inputs.ENVIRONMENT }} image
5150
working-directory: ${{ inputs.DOCKERFILE_PATH }}
5251
run: |
5352
docker build -f ${{ inputs.DOCKERFILE_NAME }} \
5453
-t ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA \
5554
-t ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:${{ inputs.ENVIRONMENT }} \
5655
.
5756
docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}
58-
- name: Promote dev image to stage
59-
if: ${{ inputs.ENVIRONMENT }} == 'stage'
60-
run: |
61-
docker pull ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:dev
62-
docker tag ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:dev \
63-
${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:${{ inputs.ENVIRONMENT }}
64-
docker tag ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:dev \
65-
${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA
66-
docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}
67-
- name: Promote stage image to prod
68-
if: ${{ inputs.ENVIRONMENT }} == 'prod'
69-
run: |
70-
docker pull ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:stage
71-
docker tag ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:stage \
72-
${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:${{ inputs.ENVIRONMENT }}
73-
docker tag ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:stage \
74-
${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}:$GITHUB_SHA
75-
docker push -a ${{ inputs.REGISTRY_URL }}/${{ inputs.APPLICATION_NAME }}

0 commit comments

Comments
 (0)