Skip to content

Commit afe3d76

Browse files
authored
Fix versioning sync in main workflow (redis#867)
* Fix versioning sync in main workflow
1 parent 8675ca5 commit afe3d76

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,14 @@ jobs:
150150
fi \
151151
&& ./google-cloud-sdk/bin/gsutil -m rsync -r -c -j html -d ${{ github.workspace }}/public gs://$BUCKET/$bucket_path
152152
153-
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
154-
for versioned_build in "${versioned_builds[@]}"; do
155-
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
156-
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
157-
done
153+
if [[ "${{ github.ref_name }}" == "latest" ]]
154+
then
155+
versioned_builds=($(find . -type d -regex ".*[0-9-]" -maxdepth 1 | sed -E 's/^.\///'))
156+
for versioned_build in "${versioned_builds[@]}"; do
157+
product=$(grep -Eo '[a-zA-Z]+' <<< $versioned_build)
158+
gsutil -m rsync -r -c -j html -d "${{ github.workspace }}/${versioned_build}/operate/${product}" "gs://${BUCKET}/${versioned_build}/operate/${product}"
159+
done
160+
fi
158161
159162
- name: End
160163
run: echo "This job's status is ${{ job.status }}."

0 commit comments

Comments
 (0)