Dont create tags anymore for triggering new builds

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2023-02-24 22:31:54 +05:30
parent c6a24f1e53
commit fb16a97bcf
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -8,7 +8,6 @@
from git import Repo
import subprocess
import os
from time import time
from requests import post
from pathlib import Path
@ -23,9 +22,7 @@ gitlab_token = os.environ.get("GITLAB_TOKEN")
cwd = os.getcwd()
path = Path(cwd)
base_dir = str(path.parent.absolute())
current_time = str(int(time()))
repo = Repo(base_dir)
repo.create_tag(current_time)
# Nuke the remote if it existed
try:
@ -39,7 +36,7 @@ repo.create_remote(
)
# Push the newly created tag
repo.git.push("pushback", current_time)
repo.git.push("pushback", "HEAD:prod", force=True)
# Trigger site rebuild
data = {"token": gitlab_token, "ref": "source"}