Skip to content

Commit

Permalink
fix: dispatch event pr (#208)
Browse files Browse the repository at this point in the history
* ci: modify target branch

* ci: fixing typo
  • Loading branch information
mananrangkuti authored Dec 30, 2024
1 parent ac35461 commit aebe9ef
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion sdet/trigger-automation-test-when-deploy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,19 @@ runs:
shell: bash
if: "${{ inputs.trigger_automation_test_api_when_deploy == 'true' }}"
run: |
if gh api repos/kitabisa/qorin/git/refs/heads/${PR_BRANCH} > /dev/null 2>&1; then
TARGET_REF=${PR_BRANCH}
else
echo "Branch ${PR_BRANCH} not found. Using fallback 'master'"
TARGET_REF=master
fi
echo "Using ref: $TARGET_REF"
gh workflow run -R kitabisa/qorin .github/workflows/trigger-when-deploy.yaml \
-f profile=${{ inputs.service_name }} \
-f pr_author="${PR_AUTHOR}" \
-f pr_link="${PR_LINK}" \
--ref "${PR_BRANCH}"
--ref "$TARGET_REF"
env:
GITHUB_TOKEN: ${{ inputs.gh_token }}

0 comments on commit aebe9ef

Please sign in to comment.