File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches : [ 'main' ]
6
6
paths : [ 'services/match/**', 'services/question/**', 'services/user/**' ]
7
- pull_request :
8
- branches : [ 'main' ]
9
- types : [ 'opened', 'reopened', 'synchronize']
10
7
11
8
# Allows you to run this workflow manually from the Actions tab
12
9
workflow_dispatch :
41
38
service:
42
39
- '.services/${{ matrix.service }}/**'
43
40
44
- - name : Exit if no changes found
45
- if : steps.changes.output.service == 'false'
46
- run : exit 0
47
-
48
41
- name : Configure AWS credentials
49
42
id : aws-configure
43
+ if : steps.changes.output.service == 'true'
50
44
uses :
aws-actions/[email protected]
51
45
with :
52
46
role-to-assume : ${{ secrets.AWS_BACKEND_ROLE }}
@@ -55,10 +49,12 @@ jobs:
55
49
56
50
- name : Login to AWS ECR
57
51
id : login-ecr
52
+ if : steps.changes.output.service == 'true'
58
53
uses :
aws-actions/[email protected]
59
54
60
- - name : Build and push ${{ matrix.service }} image to Amazon ECR
55
+ - name : Build and push ${{ matrix.service }} image to AWS ECR
61
56
id : build-image
57
+ if : steps.changes.output.service == 'true'
62
58
env :
63
59
ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
64
60
ECR_REPOSITORY : ${{ matrix.service }}
70
66
71
67
- name : Update AWS Service (${{ matrix.service }}) # Trigger re-deployment with latest image
72
68
id : update-service
69
+ if : steps.changes.output.service == 'true'
73
70
env :
74
71
ECS_SERVICE : ${{ matrix.service }}-service
75
72
run : |
You can’t perform that action at this time.
0 commit comments