Skip to content

Commit 85be63f

Browse files
authored
Fix workflow so that it works properly for staging paths (#905)
1 parent 0bdb1c6 commit 85be63f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,14 @@ jobs:
159159
done
160160
fi
161161
162+
if [[ "$bucket_path" == staging/* ]]
163+
then
164+
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
165+
for versioned_build in "${versioned_builds[@]}"; do
166+
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
167+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${bucket_path}/${versioned_build}/operate/${product}"
168+
done
169+
fi
170+
162171
- name: End
163172
run: echo "This job's status is ${{ job.status }}."

0 commit comments

Comments
 (0)