Add some comments and explanation
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
6108dc4dd5
commit
125ebd7a6c
1 changed files with 5 additions and 0 deletions
5
build.py
5
build.py
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue