Skip to content

Commit ea304d3

Browse files
committed
feat: add support for deployment "task" and multi-deployments for a given environment
1 parent c9fcc36 commit ea304d3

File tree

12 files changed

+259
-88
lines changed

12 files changed

+259
-88
lines changed

__tests__/main.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,8 @@ test('runs the action and fails due to invalid environment deployment order', as
587587
expect.any(Object),
588588
['development', 'staging', 'production'],
589589
'production',
590-
'deadbeef'
590+
'deadbeef',
591+
null
591592
)
592593
})
593594

action.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: "branch-deploy"
22
description: "Enabling Branch Deployments through IssueOps with GitHub Actions"
33
author: "Grant Birkinbine"
44
branding:
5-
icon: 'git-branch'
6-
color: 'gray-dark'
5+
icon: "git-branch"
6+
color: "gray-dark"
77
inputs:
88
github_token:
99
description: The GitHub token used to create an authenticated client - Provided for you by default!
@@ -74,7 +74,7 @@ inputs:
7474
required: false
7575
default: "false"
7676
param_separator:
77-
description: 'The separator to use for parsing parameters in comments in deployment requests. Parameters will are saved as outputs and can be used in subsequent steps'
77+
description: "The separator to use for parsing parameters in comments in deployment requests. Parameters will are saved as outputs and can be used in subsequent steps"
7878
required: false
7979
default: "|"
8080
global_lock_flag:
@@ -201,6 +201,10 @@ inputs:
201201
description: 'The number of seconds to wait for a deployment confirmation before timing out. Default is "60" seconds (1 minute).'
202202
required: false
203203
default: "60"
204+
deployment_task:
205+
description: 'Task identifier for the deployment (enables concurrent deployments to same environment). When specified, multiple deployments can be active simultaneously for the same environment as long as they have different task values. Example: "frontend", "backend", "api"'
206+
required: false
207+
default: ""
204208
outputs:
205209
continue:
206210
description: 'The string "true" if the deployment should continue, otherwise empty - Use this to conditionally control if your deployment should proceed or not'
@@ -235,11 +239,11 @@ outputs:
235239
fork:
236240
description: 'The string "true" if the pull request is a fork, otherwise "false"'
237241
fork_ref:
238-
description: 'The true ref of the fork'
242+
description: "The true ref of the fork"
239243
fork_label:
240-
description: 'The API label field returned for the fork'
244+
description: "The API label field returned for the fork"
241245
fork_checkout:
242-
description: 'The console command presented in the GitHub UI to checkout a given fork locally'
246+
description: "The console command presented in the GitHub UI to checkout a given fork locally"
243247
fork_full_name:
244248
description: 'The full name of the fork in "org/repo" format'
245249
deployment_id:
@@ -261,23 +265,25 @@ outputs:
261265
sha_deployment:
262266
description: 'If "allow_sha_deployments" is enabled, and a sha deployment is performed instead of a branch deployment, this output variable will contain the sha that was deployed. Otherwise, this output variable will be empty'
263267
review_decision:
264-
description: 'The pull request review status. Can be one of a few values - examples: APPROVED, REVIEW_REQUIRED, CHANGES_REQUESTED, skip_reviews,, null'
268+
description: "The pull request review status. Can be one of a few values - examples: APPROVED, REVIEW_REQUIRED, CHANGES_REQUESTED, skip_reviews,, null"
265269
is_outdated:
266270
description: 'The string "true" if the branch is outdated, otherwise "false"'
267271
merge_state_status:
268272
description: 'The status of the merge state. Can be one of a few values - examples: "DIRTY", "DRAFT", "CLEAN", etc'
269273
commit_status:
270274
description: 'The status of the commit. Can be one of a few values - examples: "SUCCESS", null, "skip_ci", "PENDING", "FAILURE" etc'
271275
approved_reviews_count:
272-
description: 'The number of approved reviews on the pull request'
276+
description: "The number of approved reviews on the pull request"
273277
needs_to_be_deployed:
274278
description: 'A comma separated list of environments that need successful and active deployments before the current environment (that was requested) can be deployed. This output is tied to the "enforced_deployment_order" input option.'
275279
commit_verified:
276280
description: 'The string "true" if the commit has a verified signature, otherwise "false"'
277281
total_seconds:
278-
description: 'The total number of seconds that the deployment took to complete (Integer)'
282+
description: "The total number of seconds that the deployment took to complete (Integer)"
279283
non_default_target_branch_used:
280284
description: 'The string "true" if the pull request is targeting a branch other than the default branch (aka stable branch) for the merge, otherwise unset'
285+
deployment_task:
286+
description: "The task identifier used for the deployment, enabling concurrent deployments to the same environment"
281287
runs:
282288
using: "node20"
283289
main: "dist/index.js"

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)