Merge pull request #2226 from Kobzol/rustc-pull-ci-bash

Fix rustc-pull CI's bash commands
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-28 12:35:41 +08:00 committed by GitHub
commit 15929a3a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -50,10 +50,10 @@ jobs:
RESULT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | length' --json title` RESULT=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | length' --json title`
if [[ "$RESULT" -eq 0 ]]; then if [[ "$RESULT" -eq 0 ]]; then
echo "Creating new pull request" echo "Creating new pull request"
PR_URL=gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.' PR_URL=`gh pr create -B master --title 'Rustc pull update' --body 'Latest update from rustc.'`
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
else else
PR_URL=gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title PR_URL=`gh pr list --author github-actions[bot] --state open -q 'map(select(.title=="Rustc pull update")) | .[0].url' --json url,title`
echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT echo "pr_url=$PR_URL" >> $GITHUB_OUTPUT
fi fi
env: env: