Skip to content

Commit 956dd85

Browse files
[feat] update the main git workflow
1 parent ee68216 commit 956dd85

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ jobs:
109109
# cache-to: type=gha,mode=max
110110

111111
# Step 4: Build and Deploy to AWS
112-
# Step 2: Build and (conditionally) Deploy
113112
build-and-deploy:
114113
name: Build & Deploy to AWS ECS Fargate
115114
runs-on: ubuntu-latest
@@ -130,6 +129,7 @@ jobs:
130129
aws-region: ${{ secrets.AWS_REGION }}
131130

132131
- name: Login to Amazon ECR
132+
id: login-ecr
133133
uses: aws-actions/amazon-ecr-login@v2
134134

135135
- name: Extract metadata
@@ -146,16 +146,11 @@ jobs:
146146
docker build -t $ECR_IMAGE .
147147
echo "ECR_IMAGE=$ECR_IMAGE" >> $GITHUB_ENV
148148
149-
# Only push image & deploy when pushing to main
150149
- name: Push image to ECR
151-
# Only run on develop branch (For test purposes). To be replaced with main branch when ready.
152-
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
153150
run: |
154151
docker push $ECR_IMAGE
155152
156153
- name: Deploy to Amazon ECS
157-
# Only run on develop branch (For test purposes). To be replaced with main branch when ready.
158-
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
159154
run: |
160155
aws ecs update-service \
161156
--cluster ${{ secrets.ECS_CLUSTER_NAME }} \

0 commit comments

Comments
 (0)