Skip to content

Commit

Permalink
bypass all enforced order checks in the event of a rollback deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Sep 20, 2024
1 parent 8283dd4 commit 13863c0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ export async function run() {
// deconstruct the environment object to get the environment
environment = environmentObj.environment

// deconstruct the environment object to get the stable_branch_used value
const stableBranchUsed = environmentObj.environmentObj.stable_branch_used

// If the environment targets are not valid, then exit
if (!environment) {
core.debug('No valid environment targets found')
Expand Down Expand Up @@ -433,8 +436,11 @@ export async function run() {
return 'failure'
}

// check for enforced deployment order
if (inputs.enforced_deployment_order.length > 0) {
// check for enforced deployment order if the input was provided and we are NOT deploying to the stable branch
if (
inputs.enforced_deployment_order.length > 0 &&
stableBranchUsed !== true
) {
const deploymentOrderResults = await validDeploymentOrder(
octokit,
context,
Expand Down

0 comments on commit 13863c0

Please sign in to comment.