fix(GHA): adjust order of checks in legacy

This commit is contained in:
Mrugesh Mohapatra
2025-04-15 13:06:46 +05:30
parent a12d9b3d59
commit 560a3f661d

View File

@@ -22,20 +22,18 @@ jobs:
- name: Setup
id: setup
run: |
if [[ "${{ github.event_name }}" == "workflow_run" && "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then
echo "Node.js tests failed in the triggering workflow run. Check logs in its workflow run. Exiting."
exit 1
fi
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
BRANCH="${{ github.event.workflow_run.head_branch }}"
else
BRANCH="${{ github.ref_name }}"
fi
if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then
echo "Node.js test run failed. Check logs in its workflow run. Exiting."
exit 1
fi
echo "Node.js test run succeeded. Continuing..."
echo "Current branch: $BRANCH"
case "$BRANCH" in
"prod-current")
echo "site_tld=org" >> $GITHUB_OUTPUT