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

Commit f583516

Browse files
authored
Updating workflows (#32)
* update workflows * vars * Unquote. * Just use the VAR. * quotes * false * use partial task definition
1 parent 60fdb22 commit f583516

9 files changed

Lines changed: 55 additions & 10 deletions

.github/workflows/ecspresso-feature-branch.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ on:
6969
type: boolean
7070
required: false
7171
default: false
72+
use-partial-taskdefinition:
73+
description: "Use partial task definition (ecspresso)"
74+
required: false
75+
type: boolean
76+
default: true
7277
app:
7378
description: "Application name. Used with monorepo pattern when there are several applications in the repo"
7479
required: false
@@ -120,6 +125,7 @@ jobs:
120125
qa2: deploy/qa2
121126
enable-migration: ${{ inputs.enable-migration }}
122127
support-rollback: ${{ inputs.support-rollback }}
128+
use-partial-taskdefinition: ${{ inputs.use-partial-taskdefinition }}
123129
secrets:
124130
secret-outputs-passphrase: ${{ secrets.secret-outputs-passphrase }}
125131
github-private-actions-pat: ${{ secrets.github-private-actions-pat }}

.github/workflows/ecspresso-hotfix-branch.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: |-
22
Hotfix branch (Pull request into release/* branches) workflow
3-
3+
44
Build, test Docker image, deploy it with Spacelift to `hotfix` environment depends of PR labels
5-
5+
66
### Usage
7-
7+
88
Create in your repo __`.github/workflows/hotfix-branch.yaml`__
9-
9+
1010
```yaml
1111
name: Hotfix Branch
1212
on:
@@ -73,6 +73,16 @@ on:
7373
description: "Application name. Used with monorepo pattern when there are several applications in the repo"
7474
required: false
7575
type: string
76+
use-partial-taskdefinition:
77+
description: "Use partial task definition (ecspresso)"
78+
type: boolean
79+
required: false
80+
default: true
81+
deploy-timeout:
82+
description: "Timeout for ecspresso deploy step (e.g., 10m, 30m)"
83+
type: string
84+
required: false
85+
default: 10m
7686
secrets:
7787
secret-outputs-passphrase:
7888
description: "Passphrase to encrypt/decrypt secret outputs with gpg. For more information [read](https://github.com/cloudposse/github-action-secret-outputs)"
@@ -104,7 +114,7 @@ jobs:
104114

105115
cd:
106116
uses: ./.github/workflows/workflow-cd-preview-ecspresso.yml
107-
needs: [ ci ]
117+
needs: [ci]
108118
if: ${{ always() }}
109119
with:
110120
image: ${{ needs.ci.outputs.image }}
@@ -119,6 +129,8 @@ jobs:
119129
app: ${{ inputs.app }}
120130
env-label: |
121131
hotfix: deploy
132+
use-partial-taskdefinition: ${{ inputs.use-partial-taskdefinition || '' }}
133+
timeout: ${{ inputs.deploy-timeout }}
122134
secrets:
123135
secret-outputs-passphrase: ${{ secrets.secret-outputs-passphrase }}
124136
github-private-actions-pat: ${{ secrets.github-private-actions-pat }}

.github/workflows/ecspresso-main-branch.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ on:
5050
type: boolean
5151
required: false
5252
default: false
53+
use-partial-taskdefinition:
54+
description: "Use partial task definition (ecspresso)"
55+
required: false
56+
type: boolean
57+
default: true
5358
app:
5459
description: "Application name. Used with monorepo pattern when there are several applications in the repo"
5560
required: false
@@ -94,6 +99,7 @@ jobs:
9499
enable-migration: ${{ inputs.enable-migration }}
95100
support-rollback: ${{ inputs.support-rollback }}
96101
app: ${{ inputs.app }}
102+
use-partial-taskdefinition: ${{ inputs.use-partial-taskdefinition }}
97103
secrets:
98104
secret-outputs-passphrase: "${{ secrets.secret-outputs-passphrase }}"
99105
github-private-actions-pat: "${{ secrets.github-private-actions-pat }}"

.github/workflows/ecspresso-release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ on:
5656
type: boolean
5757
required: false
5858
default: false
59+
use-partial-taskdefinition:
60+
description: "Use partial task definition (ecspresso)"
61+
required: false
62+
type: boolean
63+
default: true
5964
app:
6065
description: "Application name. Used with monorepo pattern when there are several applications in the repo"
6166
required: false
@@ -102,6 +107,7 @@ jobs:
102107
enable-migration: ${{ inputs.enable-migration }}
103108
support-rollback: ${{ inputs.support-rollback }}
104109
app: ${{ inputs.app }}
110+
use-partial-taskdefinition: ${{ inputs.use-partial-taskdefinition }}
105111
secrets:
106112
secret-outputs-passphrase: ${{ secrets.secret-outputs-passphrase }}
107113
github-private-actions-pat: ${{ secrets.github-private-actions-pat }}
@@ -118,6 +124,7 @@ jobs:
118124
enable-migration: ${{ inputs.enable-migration }}
119125
support-rollback: ${{ inputs.support-rollback }}
120126
app: ${{ inputs.app }}
127+
use-partial-taskdefinition: ${{ inputs.use-partial-taskdefinition }}
121128
secrets:
122129
secret-outputs-passphrase: ${{ secrets.secret-outputs-passphrase }}
123130
github-private-actions-pat: ${{ secrets.github-private-actions-pat }}

.github/workflows/feature-branch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
labels: ${{ toJSON(github.event.pull_request.labels.*.name) }}
1919
ref: ${{ github.event.pull_request.head.ref }}
2020
app: "example-${{ github.event.repository.name }}" # example-app-on-ecs
21+
use-partial-taskdefinition: true
2122

2223
secrets:
2324
github-private-actions-pat: "${{ secrets.PUBLIC_AND_PRIVATE_REPO_ACCESS_TOKEN_REPO }}"

.github/workflows/hotfix-branch.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Hotfix Branch
22
on:
33
pull_request:
4-
branches: [ 'release/**' ]
4+
branches: ["release/**"]
55
types: [opened, synchronize, reopened, closed, labeled, unlabeled]
66

77
concurrency:
@@ -18,6 +18,7 @@ jobs:
1818
labels: ${{ toJSON(github.event.pull_request.labels.*.name) }}
1919
ref: ${{ github.event.pull_request.head.ref }}
2020
app: "example-${{ github.event.repository.name }}"
21+
use-partial-taskdefinition: false
2122
# enable-migration: false # defaults to false
2223
# support-rollback: false # defaults to false
2324
secrets:

.github/workflows/main-branch.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Main Branch
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [main]
55

66
concurrency:
77
group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,6 +14,7 @@ jobs:
1414
organization: "${{ github.event.repository.owner.login }}"
1515
repository: "${{ github.event.repository.name }}"
1616
app: "example-${{ github.event.repository.name }}"
17+
use-partial-taskdefinition: false
1718
secrets:
1819
github-private-actions-pat: "${{ secrets.PUBLIC_AND_PRIVATE_REPO_ACCESS_TOKEN_REPO }}"
1920
registry: "${{ secrets.ECR_REGISTRY }}"

.github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
repository: "${{ github.event.repository.name }}"
1616
version: ${{ github.event.release.tag_name }}
1717
app: "example-${{ github.event.repository.name }}"
18+
use-partial-taskdefinition: false
1819
secrets:
1920
github-private-actions-pat: "${{ secrets.PUBLIC_AND_PRIVATE_REPO_ACCESS_TOKEN_REPO }}"
2021
registry: "${{ secrets.ECR_REGISTRY }}"

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ on:
6464
type: boolean
6565
required: false
6666
default: false
67+
use-partial-taskdefinition:
68+
description: "Use partial task definition (ecspresso)"
69+
type: boolean
70+
required: false
71+
default: true
72+
deploy-timeout:
73+
description: "Timeout for ecspresso deploy step (e.g., 10m, 30m)"
74+
type: string
75+
required: false
76+
default: 10m
6777
matrix-step-name:
6878
description: "Matrix step name - matrix output workaround. [Read more](https://github.com/cloudposse/github-action-matrix-outputs-write#introduction)"
6979
required: false
@@ -144,7 +154,7 @@ jobs:
144154
application: ${{ steps.environment.outputs.name }}
145155
taskdef-path: ${{ inputs.path }}
146156
mirror_to_s3_bucket: ${{ steps.environment.outputs.s3-bucket }}
147-
use_partial_taskdefinition: 'true'
157+
use_partial_taskdefinition: ${{ inputs.use-partial-taskdefinition || '' }}
148158
overrides: |-
149159
{
150160
"containerOverrides":[
@@ -179,8 +189,8 @@ jobs:
179189
application: ${{ steps.environment.outputs.name }}
180190
taskdef-path: ${{ inputs.path }}
181191
mirror_to_s3_bucket: ${{ steps.environment.outputs.s3-bucket }}
182-
use_partial_taskdefinition: 'true'
183-
timeout: 10m
192+
use_partial_taskdefinition: ${{ inputs.use-partial-taskdefinition || '' }}
193+
timeout: ${{ inputs.deploy-timeout }}
184194
env:
185195
STAGE: ${{ steps.environment.outputs.stage }}
186196
AWS_ACCOUNT_ID: ${{ steps.environment.outputs.account-id }}

0 commit comments

Comments
 (0)