File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -89,25 +89,25 @@ FILES: |
8989Nested file with same nested file structure destination
9090` ` ` yaml
9191FILES: |
92- / .github/dependabot.yml
92+ .github/dependabot.yml
9393` ` `
9494Nested file with new destination
9595` ` ` yaml
9696FILES: |
97- / sync/dependabot.yml=.github/dependabot.yml
97+ sync/dependabot.yml=.github/dependabot.yml
9898` ` `
9999
100100<u>Folder Sync</u>
101101
102102Root folder to root directory
103103` ` ` yaml
104104FILES: |
105- ./ sync
105+ sync
106106` ` `
107107Root folder with new directory
108108` ` ` yaml
109109FILES: |
110- ./ sync=newFolderName
110+ sync/ =newFolderName/
111111` ` `
112112# ## TOKEN parameter
113113Use the repository secret named `ACTIONS`
@@ -116,6 +116,7 @@ TOKEN: ${{ secrets.ACTIONS }}
116116` ` `
117117
118118# # Troubleshooting
119+ # ## Spacing
119120Spacing around the equal sign is important. For example, this will not work :
120121` ` ` yaml
121122FILES: |
@@ -130,4 +131,9 @@ instead of 1 object
130131
131132- folder/file-sync.yml = folder/test.txt
132133
133- and there is nothing I can do in code to make up for that
134+ and there is nothing I can do in code to make up for that
135+
136+ # ## Slashes
137+ You do not need (nor want) leading `/` for the file path on either side of the equal sign
138+
139+ The only time you need `/` trailing is for folder copies. While a file copy will technically still work with a leading `/`, a folder copy will not
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ for repository in "${REPOSITORIES[@]}"; do
102102
103103 # copy file
104104 echo " Copying: [$SOURCE_FULL_PATH ] to [$DEST_FULL_PATH ]"
105- cp " ${SOURCE_FULL_PATH} " " ${DEST_FULL_PATH} "
105+ cp " ${SOURCE_FULL_PATH} " " ${DEST_FULL_PATH} " -r
106106
107107 # add file
108108 git add " ${DEST_FULL_PATH} " -f
You can’t perform that action at this time.
0 commit comments