We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc7185d commit 9266796Copy full SHA for 9266796
.github/workflows/sync.yml
@@ -57,8 +57,8 @@ jobs:
57
- name: Check if target_sync_branch exists in the remote
58
id: check-branch-exists
59
run: |
60
- # grep -qE 使用了 -E 参数来启用扩展的正则表达式, 并且使用了 $ 符号来确保匹配的字符串以 main 结尾, 达到精准匹配的目的
61
- if git ls-remote --heads origin | grep -qE 'refs/heads/${{ inputs.target_sync_branch }}$'; then
+ # 使用了 -E 参数来启用扩展的正则表达式, 并且使用了 $ 符号来确保匹配的字符串以 main 结尾, 达到精准匹配的目的
+ if git ls-remote --heads origin | grep -E 'refs/heads/${{ inputs.target_sync_branch }}$'; then
62
echo "branch_exists=true" >> $GITHUB_OUTPUT
63
echo "Remote branch ${{ inputs.target_sync_branch }} exists."
64
git checkout ${{ inputs.target_sync_branch }}
0 commit comments