How to Auto update Ghost image on GCP

Dear Community,

I am running on Ghost 5.73 fine, I not having any errors, yet I am looking to automate the update process rather than running a script inside the Instance on GCP.
I have checked multiple services on GCP (Cloud Build, Cloud Function…)


sudo apt update && sudo apt -y
upgrade sudo apt clean && sudo apt autoclean && sudo apt autoremove
sudo npm install -g npm@latest
cd /var/www/ghost
sudo npm install -g ghost-cli@latest sudo
find ./ ! -path “./versions/*” -type f -exec chmod 664 {} ;
ghost backup
ghost stop
ghost update
ghost ls

Appreciate to share some hints or experiences.