From c75078ddd55408360b47db0d49239b4a9f770296 Mon Sep 17 00:00:00 2001 From: Alter-xyz <88554920+alterxyz@users.noreply.github.com> Date: Mon, 19 May 2025 17:28:43 +0800 Subject: [PATCH] chore: action --- .github/workflows/docs_bundle.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs_bundle.yml b/.github/workflows/docs_bundle.yml index a788fb37..15b6056b 100644 --- a/.github/workflows/docs_bundle.yml +++ b/.github/workflows/docs_bundle.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 @@ -48,33 +48,32 @@ jobs: fi - name: Commit changes - if: always() # Execute this step even if previous steps fail + if: always() run: | - # Check if there are file changes if [[ -n "$(git status --porcelain)" ]]; then FINAL_COMMIT_SUBJECT="" if [[ -n "${{ steps.doc-tools.outputs.commit_message }}" ]]; then FINAL_COMMIT_SUBJECT="${{ steps.doc-tools.outputs.commit_message }}" else - FINAL_COMMIT_SUBJECT="Docs: Automated documentation updates" # Default subject if script provides none + FINAL_COMMIT_SUBJECT="Docs: Automated documentation updates" fi FINAL_COMMIT_BODY="" if [[ -n "${{ steps.doc-tools.outputs.detailed_message }}" ]]; then FINAL_COMMIT_BODY="${{ steps.doc-tools.outputs.detailed_message }}" else - FINAL_COMMIT_BODY="No detailed information provided by the script." # Default body if script provides none + FINAL_COMMIT_BODY="No detailed information provided by the script." fi git config --local user.email "88554920+alterxyz@users.noreply.github.com" git config --local user.name "alterxyz" git add . - # Use the subject from script's commit_message and body from script's detailed_message git commit -m "$FINAL_COMMIT_SUBJECT" -m "$FINAL_COMMIT_BODY" || echo "No changes to commit" - git push + git push origin HEAD:main + echo "Changes committed with subject: $FINAL_COMMIT_SUBJECT" echo "Description:" echo "$FINAL_COMMIT_BODY" else echo "No file changes, skipping commit" - fi + fi \ No newline at end of file