Skip to content

Commit fdfbd9e

Browse files
committed
refactor(health-check): Replace auto-commit action with manual git commands for report publishing
1 parent a1b6eb0 commit fdfbd9e

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/health-check.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,22 @@ jobs:
5050
echo "Report file not found"
5151
fi
5252
53-
- name: Commit and push report
53+
- name: Publish report to checker branch
5454
if: steps.check_report.outputs.report_exists == 'true'
55-
uses: stefanzweifel/git-auto-commit-action@v5
56-
with:
57-
commit_message: "chore(health): update node health status report"
58-
file_pattern: "node-report.md"
59-
commit_user_name: "github-actions[bot]"
60-
commit_user_email: "github-actions[bot]@users.noreply.github.com"
61-
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
62-
branch: checker
63-
create_branch: true
64-
push_options: "--force"
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GITHUB_REPOSITORY: ${{ github.repository }}
58+
run: |
59+
publish_dir=$(mktemp -d)
60+
cp node-report.md "${publish_dir}/node-report.md"
61+
cd "${publish_dir}"
62+
git init
63+
git checkout -b checker
64+
git config user.name "github-actions[bot]"
65+
git config user.email "github-actions[bot]@users.noreply.github.com"
66+
git add node-report.md
67+
git commit -m "chore(health): update node health status report"
68+
git push --force "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" checker
6569
6670
- name: Upload report as artifact
6771
if: always()

0 commit comments

Comments
 (0)