47
47
with :
48
48
fetch-depth : 0
49
49
- uses : nrwl/nx-set-shas@v4
50
- - uses : useblacksmith/setup-node@v5
50
+
51
+ - name : Setup Node.js
52
+ uses : useblacksmith/setup-node@v5
51
53
with :
52
54
node-version : ${{ matrix.node-version }}
53
55
@@ -67,29 +69,16 @@ jobs:
67
69
path : ./node_modules
68
70
- name : NPM Install
69
71
run : npm install --silent
70
-
71
- - name : nx Install
72
- run : npm install -g nx --silent
73
-
74
72
- name : Get affected apps
75
73
run : |
76
74
echo "apps=$(npx ts-node tools/scripts/affected-apps.ts --projects apis/api-*)" >> $GITHUB_OUTPUT
77
75
cat $GITHUB_OUTPUT
78
76
id : affected-apps
79
-
80
- - name : Has Prisma
81
- id : has_prisma
82
- uses : andstor/file-existence-action@v3
83
- with :
84
- files : ' apis/${{inputs.name}}/db/schema.prisma'
85
-
86
- - name : Prisma Migrate
87
- if : steps.has_prisma.outputs.files_exists == 'true' && contains(steps.affected-apps.outputs.apps, inputs.name)
77
+ - name : Prisma Generate
78
+ if : contains(steps.affected-apps.outputs.apps, inputs.name)
88
79
uses : mansagroup/nrwl-nx-action@v3
89
80
with :
90
81
targets : prisma-generate
91
- projects : ${{ inputs.name }}
92
- parallel : 1
93
82
env :
94
83
DISABLE_ERD : true
95
84
- name : Build ${{ inputs.name }}
102
91
103
92
# ECS Deployment
104
93
- name : Configure ECS AWS credentials
94
+ if : contains(steps.affected-apps.outputs.apps, inputs.name)
105
95
uses : aws-actions/configure-aws-credentials@v4
106
96
with :
107
97
aws-access-key-id : ${{ secrets.JFP_AWS_ACCESS_KEY_ID }}
@@ -142,5 +132,6 @@ jobs:
142
132
aws ecs update-service --force-new-deployment --service $ECS_SERVICE --cluster $ECS_CLUSTER
143
133
144
134
- name : Update Hive managed subgraph
135
+ if : contains(steps.affected-apps.outputs.apps, inputs.name)
145
136
run : |
146
137
npx hive schema:publish apis/${{ inputs.name }}/schema.graphql --service ${{ inputs.name }} --url ${{ inputs.endpoint_url }} --github
0 commit comments