Add some comments and explanation

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2023-02-24 22:00:06 +05:30
parent 6108dc4dd5
commit 125ebd7a6c
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -3,12 +3,15 @@ import os
from requests import get
import ujson
# Use github api and fetch the latest tag
data = ujson.loads(
get("https://api.github.com/repos/gohugoio/hugo/releases/latest").content
)
# Strip out the v letter
tag = data["tag_name"][1:]
# Build the image
subprocess.run(
[
"docker",
@ -20,6 +23,8 @@ subprocess.run(
"registry.baalajimaestro.me/baalajimaestro/hugo-alpine-ext:latest",
]
)
# Push the newly built image
subprocess.run(
[
"docker",