diff --git a/.github/workflows/merge-build-push.yml b/.github/workflows/merge-build-push.yml index 8e3d7bb..224d1c7 100644 --- a/.github/workflows/merge-build-push.yml +++ b/.github/workflows/merge-build-push.yml @@ -91,6 +91,16 @@ jobs: else echo "WARNING: DETECTED_VERSION is empty. Skipping start_page update for $PLAYBOOK_FILE." fi + + # Add / support symbolic paths for the latest version + redirect:to + yq -i '.urls //= {}' "$PLAYBOOK_FILE" # If the urls key does not exist, first create an empty object. + + yq -i '.urls.latest_version_segment = "latest"' "$PLAYBOOK_FILE" + yq -i '.urls.latest_version_segment_strategy = "redirect:to"' "$PLAYBOOK_FILE" + + echo "Set urls.latest_version_segment = latest" + echo "Set urls.latest_version_segment_strategy = redirect:to" + echo "Modified content of $PLAYBOOK_FILE:" cat "$PLAYBOOK_FILE" echo "--- Finished modification for $PLAYBOOK_FILE ---"