Skip to content

Commit

Permalink
Use rsync to move files (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex authored Sep 22, 2024
1 parent 46f968e commit e2af251
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ jobs:
- name: Rename generated folder to a temporary name
run: |
GENERATED_FOLDER="${{ steps.repository.outputs.name }}"
mv $GENERATED_FOLDER temp_generated_folder
GENERATED_FOLDER="${{ steps.repository.outputs.name }}"
mv $GENERATED_FOLDER temp_generated_folder
- name: Remove all files and directories in the root except temporary generated folder
run: find . -mindepth 1 ! -regex "^./temp_generated_folder\(/.*\)?" -delete

- name: Move generated project to root
run: find temp_generated_folder -mindepth 1 -exec mv -t . {} +

- name: Remove temporary generated folder
run: rmdir temp_generated_folder
- name: Move generated project to root using rsync
run: |
rsync -av temp_generated_folder/ ./
rm -rf temp_generated_folder
- name: Amend the commit history
run: |
Expand Down

0 comments on commit e2af251

Please sign in to comment.