Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
RustyTake-Off committed Jun 29, 2024
1 parent 7e616c9 commit ffbf5cb
Showing 1 changed file with 29 additions and 31 deletions.
60 changes: 29 additions & 31 deletions .github/actions/templates/moveFiles/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,58 +47,56 @@ runs:
[ -n "${{ inputs.otherDirs }}" ] && \
git checkout ${{ inputs.sourceBranchName }} -- ${{ inputs.otherDirs }} &>/dev/null
# Copy directories and files
cp -r "${{ inputs.targetBranchName }}"/* .
find "${{ inputs.targetBranchName }}" -maxdepth 1 -name '.*[!.]*' -exec cp -r {} . \;
# # Copy directories and files
# cp -r "${{ inputs.targetBranchName }}"/* .
# find "${{ inputs.targetBranchName }}" -maxdepth 1 -name '.*[!.]*' -exec cp -r {} . \;
echo '=========='
ls -al
echo '=========='
[ -n "${{ inputs.otherSharedFiles }}" ] && \
shopt -s dotglob
for item in ${{ inputs.otherSharedFiles }}; do
if [ -f "$item" ] && [ -s "$item" ]; then
shopt -s dotglob
cp "$item" .
shopt -u dotglob
elif [ -d "$item" ]; then
shopt -s dotglob
cp -r "$item" .
shopt -u dotglob
fi
done
shopt -u dotglob
echo '=========='
ls -al
echo '=========='
[ -n "${{ inputs.otherDirs }}" ] && \
for item in ${{ inputs.otherDirs }}; do
if [ -d "$item" ]; then
shopt -s dotglob
cp -r "$item" .
shopt -u dotglob
fi
done
# [ -n "${{ inputs.otherDirs }}" ] && \
# shopt -s dotglob
# for item in ${{ inputs.otherDirs }}; do
# if [ -d "$item" ]; then
# cp -r "$item" .
# fi
# done
# shopt -u dotglob
echo '=========='
ls -al
echo '=========='
# echo '=========='
# ls -al
# echo '=========='
# Clean up
rm -rf ${{ inputs.targetBranchName }}
rm README.md
[ -n "${{ inputs.otherDirs }}" ] && \
for item in ${{ inputs.otherDirs }}; do
if [ -d "$(dirname "$item")" ]; then
rm -rf "$(dirname "$item")"
fi
done
echo '=========='
ls -al
echo '=========='
# rm -rf ${{ inputs.targetBranchName }}
# rm README.md
# [ -n "${{ inputs.otherDirs }}" ] && \
# for item in ${{ inputs.otherDirs }}; do
# if [ -d "$(dirname "$item")" ]; then
# rm -rf "$(dirname "$item")"
# fi
# done
# echo '=========='
# ls -al
# echo '=========='
# Commit and push
git config --global user.name ${{ inputs.userName }}
Expand Down

0 comments on commit ffbf5cb

Please sign in to comment.