From 062e3c8d6f2b7feb3ad2188d79b11602a810bccf Mon Sep 17 00:00:00 2001 From: NianBroken Date: Tue, 13 Feb 2024 17:45:10 +0800 Subject: [PATCH] Update --- .github/workflows/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c19c5f..1f8dba3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -69,12 +69,19 @@ jobs: echo "main.yml file is inconsistent" else echo "main.yml file is consistent" + # 移除main.yml文件,以允许它不被修改 + git restore --staged .github/workflows/main.yml fi - # 排除.github/workflows/main.yml文件,避免对其进行任何修改 - - name: Exclude main.yml from changes + # 将其他更改添加到暂存区 + - name: Add other changes run: | - git restore --staged .github/workflows/main.yml + git add . + + # 提交更改到Git仓库 + - name: Commit changes + run: | + git commit -m "Update from GitHub Actions" || true # 将更改强制推送到main分支 - name: Force push changes to main branch