refactor: clean up
This commit is contained in:
10
.github/scripts/check.sh
vendored
10
.github/scripts/check.sh
vendored
@@ -8,7 +8,6 @@ required_vars=(
|
|||||||
"INSTATUS_PAGE_ID"
|
"INSTATUS_PAGE_ID"
|
||||||
"INSTATUS_COMPONENT_ID"
|
"INSTATUS_COMPONENT_ID"
|
||||||
"VERCEL_API_KEY"
|
"VERCEL_API_KEY"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check if each required variable is set
|
# Check if each required variable is set
|
||||||
@@ -19,8 +18,9 @@ for var in "${required_vars[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
JUST_REDEPLOYED="$JUST_REDEPLOYED:-0"
|
LATEST_REDEPLOY_FAILED="$LATEST_REDEPLOY_FAILED:-0"
|
||||||
if (JUST_REDEPLOYED); do
|
if (LATEST_REDEPLOY_FAILED); do
|
||||||
|
echo "Trying to re-run job when previous re-deploy failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ if (( status == 0 )); then
|
|||||||
# set to
|
# set to
|
||||||
update_component_status "OPERATIONAL"
|
update_component_status "OPERATIONAL"
|
||||||
|
|
||||||
echo "JUST_REDEPLOYED=0" >> $GITHUB_ENV
|
echo "LATEST_REDEPLOY_FAILED=0" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "The following modules have issues: ${failures[*]}"
|
echo "The following modules have issues: ${failures[*]}"
|
||||||
# check if all modules are down
|
# check if all modules are down
|
||||||
@@ -165,7 +165,7 @@ else
|
|||||||
|
|
||||||
# Update environment variable so that if automatic re-deployment fails, we
|
# Update environment variable so that if automatic re-deployment fails, we
|
||||||
# don't keep running the script over and over again
|
# don't keep running the script over and over again
|
||||||
echo "JUST_REDEPLOYED=1" >> $GITHUB_ENV
|
echo "LATEST_REDEPLOY_FAILED=1" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit "${status}"
|
exit "${status}"
|
||||||
|
|||||||
Reference in New Issue
Block a user