This commit is contained in:
NianBroken
2024-03-11 13:26:14 +08:00 Unverified
parent c7cf61ab6a
commit 361d554b0f
+3 -9
View File
@@ -74,18 +74,12 @@ jobs:
- name: Backup files
run: |
mkdir -p Backup
rsync -av --include="*/" --include="*.txt" --include="*.yml" --exclude="*" ./ Backup/
- name: Force push changes from upstream to current main branch
run: |
# 将上游main分支的更改强制推送到当前main分支
git checkout main
git reset --hard upstream/main
find . -type f -name "*.txt" -exec cp --parents {} ./Backup \;
find . -type f -name "*.yml" -exec cp --parents {} ./Backup \;
- name: Restore files
run: |
rsync -av Backup/ ./
rm -rf backup
cp -r Backup/* .
- name: Force push changes to main branch
run: |