add
This commit is contained in:
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user