From 41798bee52550088fc22dbf40629e32eb6a5a2d7 Mon Sep 17 00:00:00 2001 From: Katrina Prosise Date: Thu, 23 Apr 2026 10:44:06 -0400 Subject: [PATCH] Update publish-main workflow for republishing GitHub Workflow/Action will compare tag used to trigger build with latest tag to determine if a latest should point to release. Signed-off-by: Katrina Prosise --- .github/workflows/publish-main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish-main.yml b/.github/workflows/publish-main.yml index 3514dad8..a0148fca 100644 --- a/.github/workflows/publish-main.yml +++ b/.github/workflows/publish-main.yml @@ -42,11 +42,7 @@ jobs: - name: set release name run: | echo "release tag: $TAG" -# if [[ $TAG == mp-* ]]; then export RELEASE="$(echo $TAG | sed -r 's/^.{3}//')" -# else -# export RELEASE="$TAG" -# fi echo "VERSION=$RELEASE" >> "$GITHUB_ENV" - name: Build docs @@ -63,7 +59,8 @@ jobs: mv offline-docs.tgz $VERSION/ echo $BUCKET_CREDS > secret echo -e "secret\nY\nosf-prod\nN\n" | gsutil config -e - gsutil -m rsync -d -r dev gs://docs.foundries.io/$VERSION -# if [[ $TAG == mp-* ]]; then + gsutil -m rsync -d -r $VERSION gs://docs.foundries.io/$VERSION + export LATEST_TAG="$(git tag --sort=-committerdate | head -n 1)" + if [[ $TAG == $LATEST_TAG ]]; then gsutil -m rsync -d -r gs://docs.foundries.io/${VERSION} gs://docs.foundries.io/latest fi