Skip to content

Commit

Permalink
ci: modify target branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mananrangkuti committed Dec 30, 2024
1 parent ac35461 commit 0d1cb45
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 0d1cb45

Please # to comment.