Update
This commit is contained in:
@@ -61,11 +61,11 @@ jobs:
|
||||
rsync -av --include="*/" --include="*$EXT" --exclude="*" ./ backup/
|
||||
done
|
||||
|
||||
# 比较当前分支的 .github/workflows/main.yml 文件与上游分支的文件是否一致
|
||||
- name: Compare workflow files
|
||||
# 检查当前分支的.github/workflows/main.yml文件与上游分支的是否一致
|
||||
- name: Check consistency of main.yml file
|
||||
run: |
|
||||
if ! cmp -s .github/workflows/main.yml <(git show upstream/main:.github/workflows/main.yml); then
|
||||
echo "::error::main.yml file is inconsistent"
|
||||
echo "main.yml file is inconsistent"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -74,8 +74,8 @@ jobs:
|
||||
run: |
|
||||
git checkout main
|
||||
git reset --hard upstream/main
|
||||
git rm .github/workflows/main.yml # Remove the file from staging area
|
||||
git commit -m "Exclude main.yml file from upstream changes"
|
||||
git rm -rf .github/workflows/main.yml
|
||||
git commit -m "Exclude main.yml file from upstream changes" || true
|
||||
git push origin main --force
|
||||
|
||||
# 从备份目录将指定后缀文件还原到当前目录及子目录中,然后删除备份目录
|
||||
|
||||
Reference in New Issue
Block a user