create action archive cache.

This commit is contained in:
Tingluo Huang
2023-09-18 20:21:53 +00:00
parent 7751908620
commit 085299903d
6 changed files with 39 additions and 18 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ git push --set-upstream origin "$branch"
# Open pull request
url="https://api.github.com/repos/$GITHUB_REPOSITORY/pulls" # GITHUB_REPOSITORY format is: OWNER/REPO
body="{\"title\": \"$branch\", \"body\": \"$branch\", \"head\": \"$branch\", \"base\": \"master\"}"
body="{\"title\": \"$branch\", \"body\": \"$branch\", \"head\": \"$branch\", \"base\": \"main\"}"
http_code="$(curl --silent --output response.json --write-out '%{http_code}' --header "Authorization: bearer $GITHUB_TOKEN" --request POST --data "$body" "$url")"
if [[ "$http_code" != "201" ]]; then
echo "Unexpected HTTP CODE '$http_code'"