Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit 60fdb22

Browse files
authored
WIP Testing workflows (#31)
* update workflow * Updated secret.
1 parent bc0db21 commit 60fdb22

2 files changed

Lines changed: 33 additions & 23 deletions

File tree

.github/workflows/feature-branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Feature Branch
22
on:
33
pull_request:
4-
branches: [ 'main' ]
4+
branches: ["main"]
55
types: [opened, synchronize, reopened, closed, labeled, unlabeled]
66

77
concurrency:
88
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: false
1010

11-
jobs:
11+
jobs:
1212
do:
1313
uses: ./.github/workflows/ecspresso-feature-branch.yml
1414
with:
@@ -17,7 +17,7 @@ jobs:
1717
open: ${{ github.event.pull_request.state == 'open' }}
1818
labels: ${{ toJSON(github.event.pull_request.labels.*.name) }}
1919
ref: ${{ github.event.pull_request.head.ref }}
20-
app: "example-${{ github.event.repository.name }}"
20+
app: "example-${{ github.event.repository.name }}" # example-app-on-ecs
2121

2222
secrets:
2323
github-private-actions-pat: "${{ secrets.PUBLIC_AND_PRIVATE_REPO_ACCESS_TOKEN_REPO }}"

.github/workflows/workflow-cd-preview-ecspresso.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: |-
22
CD - Deploy to ECS QA/Preview envs with Ecspresso
3-
3+
44
Deploy Docker image to ECS QA/Preview envs with Ecspresso
5-
5+
66
### Usage
7-
7+
88
```yaml
99
name: Feature Branch
1010
on:
1111
pull_request:
1212
branches: [ 'main' ]
1313
types: [opened, synchronize, reopened, closed, labeled, unlabeled]
14-
14+
1515
jobs:
1616
cd:
1717
uses: ./.github/workflows/workflow-cd-preview-ecspresso.yml
@@ -89,6 +89,16 @@ on:
8989
type: boolean
9090
required: false
9191
default: false
92+
use-partial-taskdefinition:
93+
description: "Use partial task definition (ecspresso)"
94+
type: boolean
95+
required: false
96+
default: true
97+
deploy-timeout:
98+
description: "Timeout for ecspresso deploy step (e.g., 10m, 30m)"
99+
type: string
100+
required: false
101+
default: 15m
92102
matrix-step-name:
93103
description: "Matrix step name - matrix output workaround. [Read more](https://github.com/cloudposse/github-action-matrix-outputs-write#introduction)"
94104
required: false
@@ -139,7 +149,7 @@ jobs:
139149
environment:
140150
name: ${{ matrix.env }}
141151
url: ${{ steps.result.outputs.webapp-url }}
142-
needs: [ preview ]
152+
needs: [preview]
143153
steps:
144154
- uses: cloudposse/[email protected]
145155
id: image
@@ -166,8 +176,8 @@ jobs:
166176
with:
167177
output_properties: true
168178
patterns: |
169-
- .github/configs/environment.yaml
170-
179+
- .github/configs/environment.yaml
180+
171181
- name: Environment Info
172182
uses: cloudposse/[email protected]
173183
id: environment
@@ -203,7 +213,7 @@ jobs:
203213
application: ${{ steps.environment.outputs.name }}
204214
taskdef-path: ${{ inputs.path }}
205215
mirror_to_s3_bucket: ${{ steps.environment.outputs.s3-bucket }}
206-
use_partial_taskdefinition: 'true'
216+
use_partial_taskdefinition: ${{ inputs.use-partial-taskdefinition || '' }}
207217
overrides: |-
208218
{
209219
"containerOverrides":[
@@ -217,8 +227,8 @@ jobs:
217227
]
218228
}
219229
env:
220-
STAGE: ${{ steps.environment.outputs.stage }}
221-
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
230+
STAGE: ${{ steps.environment.outputs.stage }}
231+
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
222232
ECS_SERVICE_NAME: ${{ steps.environment.outputs.name }}
223233
ECS_SERVICE_TASK_ROLE: ${{ steps.environment.outputs.role }}-task
224234
ECS_SERVICE_EXECUTION_ROLE: ${{ steps.environment.outputs.role }}-exec
@@ -238,11 +248,11 @@ jobs:
238248
application: ${{ steps.environment.outputs.name }}
239249
taskdef-path: ${{ inputs.path }}
240250
mirror_to_s3_bucket: ${{ steps.environment.outputs.s3-bucket }}
241-
use_partial_taskdefinition: 'true'
242-
timeout: 15m
251+
use_partial_taskdefinition: ${{ inputs.use-partial-taskdefinition || '' }}
252+
timeout: ${{ inputs.deploy-timeout }}
243253
env:
244-
STAGE: ${{ steps.environment.outputs.stage }}
245-
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
254+
STAGE: ${{ steps.environment.outputs.stage }}
255+
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
246256
ECS_SERVICE_NAME: ${{ steps.environment.outputs.name }}
247257
ECS_SERVICE_TASK_ROLE: ${{ steps.environment.outputs.role }}-task
248258
ECS_SERVICE_EXECUTION_ROLE: ${{ steps.environment.outputs.role }}-exec
@@ -272,8 +282,8 @@ jobs:
272282
]
273283
}
274284
env:
275-
STAGE: ${{ steps.environment.outputs.stage }}
276-
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
285+
STAGE: ${{ steps.environment.outputs.stage }}
286+
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
277287
ECS_SERVICE_NAME: ${{ steps.environment.outputs.name }}
278288
ECS_SERVICE_TASK_ROLE: ${{ steps.environment.outputs.role }}-task
279289
ECS_SERVICE_EXECUTION_ROLE: ${{ steps.environment.outputs.role }}-exec
@@ -302,7 +312,7 @@ jobs:
302312
strategy:
303313
matrix:
304314
env: ${{ fromJson(needs.preview.outputs.destroy_envs) }}
305-
needs: [ preview ]
315+
needs: [preview]
306316
steps:
307317
- uses: cloudposse/[email protected]
308318
id: image
@@ -337,7 +347,7 @@ jobs:
337347
with:
338348
output_properties: true
339349
patterns: |
340-
- .github/configs/environment.yaml
350+
- .github/configs/environment.yaml
341351
342352
- name: Environment Info
343353
uses: cloudposse/[email protected]
@@ -385,8 +395,8 @@ jobs:
385395
]
386396
}
387397
env:
388-
STAGE: ${{ steps.environment.outputs.stage }}
389-
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
398+
STAGE: ${{ steps.environment.outputs.stage }}
399+
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}
390400
ECS_SERVICE_NAME: ${{ steps.environment.outputs.name }}
391401
ECS_SERVICE_TASK_ROLE: ${{ steps.environment.outputs.role }}-task
392402
ECS_SERVICE_EXECUTION_ROLE: ${{ steps.environment.outputs.role }}-exec

0 commit comments

Comments
 (0)