Merge pull request #55 from devchat-ai/improve-ci-message
Imporve sync action message
This commit is contained in:
commit
61e45a6827
8
.github/workflows/sync-devchat.yml
vendored
8
.github/workflows/sync-devchat.yml
vendored
@ -51,6 +51,7 @@ jobs:
|
|||||||
cd ./temp/devchat-repo
|
cd ./temp/devchat-repo
|
||||||
DEVCHAT_HEXSHA=$(git rev-parse HEAD | cut -c 1-8)
|
DEVCHAT_HEXSHA=$(git rev-parse HEAD | cut -c 1-8)
|
||||||
DEVCHAT_BRANCH=$(git branch --show-current)
|
DEVCHAT_BRANCH=$(git branch --show-current)
|
||||||
|
DEVCHAT_MESSAGE_=$(git log -1 --pretty=%s)
|
||||||
pip install --no-binary :all: "pydantic==1.10.14"
|
pip install --no-binary :all: "pydantic==1.10.14"
|
||||||
pip install charset-normalizer --no-binary :all:
|
pip install charset-normalizer --no-binary :all:
|
||||||
pip install git+https://github.com/devchat-ai/tiktoken.git
|
pip install git+https://github.com/devchat-ai/tiktoken.git
|
||||||
@ -71,6 +72,7 @@ jobs:
|
|||||||
|
|
||||||
echo "DEVCHAT_HEXSHA=$DEVCHAT_HEXSHA" >> $GITHUB_ENV
|
echo "DEVCHAT_HEXSHA=$DEVCHAT_HEXSHA" >> $GITHUB_ENV
|
||||||
echo "DEVCHAT_BRANCH=$DEVCHAT_BRANCH" >> $GITHUB_ENV
|
echo "DEVCHAT_BRANCH=$DEVCHAT_BRANCH" >> $GITHUB_ENV
|
||||||
|
echo "DEVCHAT_MESSAGE=$DEVCHAT_MESSAGE" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Commit, Push and Create PR
|
- name: Commit, Push and Create PR
|
||||||
run: |
|
run: |
|
||||||
@ -81,13 +83,13 @@ jobs:
|
|||||||
git checkout -b $BRANCH_NAME
|
git checkout -b $BRANCH_NAME
|
||||||
git diff --stat
|
git diff --stat
|
||||||
git add ./site-packages
|
git add ./site-packages
|
||||||
git commit -m "Sync up site-packages to devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA)"
|
git commit -m "Sync: devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $DEVCHAT_MESSAGE"
|
||||||
git status
|
git status
|
||||||
git push origin $BRANCH_NAME
|
git push origin $BRANCH_NAME
|
||||||
echo -e "This PR is auto-generated by GitHub Action. \n- devchat branch: \`$DEVCHAT_BRANCH\` \n- devchat hexsha: \`$DEVCHAT_HEXSHA\` \n- actor: ${{ github.triggering_actor }}" > pr_body
|
echo -e "This PR is auto-generated by GitHub Action. \n- devchat branch: \`$DEVCHAT_BRANCH\` \n- devchat hexsha: \`$DEVCHAT_HEXSHA\` \n- message: $DEVCHAT_MESSAGE \n- actor: ${{ github.triggering_actor }}" > pr_body
|
||||||
PR_BODY=$(cat pr_body)
|
PR_BODY=$(cat pr_body)
|
||||||
gh pr create \
|
gh pr create \
|
||||||
--title "Sync up site-packages to devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $TIMESTAMP" \
|
--title ":arrows_counterclockwise: Sync: devchat[$DEVCHAT_BRANCH]($DEVCHAT_HEXSHA) $TIMESTAMP" \
|
||||||
--body "$PR_BODY" \
|
--body "$PR_BODY" \
|
||||||
--draft \
|
--draft \
|
||||||
--base main \
|
--base main \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user