fix: replace timestamp by git runner on staging deploy

This commit is contained in:
2026-04-08 11:21:32 -03:00
committed by GitHub
parent 397894903b
commit a07cc97c11
2 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -75,7 +75,8 @@ jobs:
-var="security_key=${{ secrets.JWT_SECURITY_KEY }}" \
-var="mailgun_apikey=${{ secrets.MAILGUN_API_KEY }}" \
-var="backend_image=${{ steps.deploy-vars.outputs.backend_image }}" \
-var="frontend_image=${{ steps.deploy-vars.outputs.frontend_image }}"
-var="frontend_image=${{ steps.deploy-vars.outputs.frontend_image }}" \
-var="deploy_version=${{ github.run_id }}"
terraform show -json tfplan > tfplan.json
if jq -e '.resource_changes | length == 0' tfplan.json >/dev/null; then
echo "no_changes=true" >> "$GITHUB_OUTPUT"
+7 -2
View File
@@ -68,6 +68,11 @@ variable "frontend_image" {
default = "ghcr.io/rmcampos/tasknote/app:candidate"
}
variable "deploy_version" {
type = string
default = "manual"
}
resource "kubernetes_namespace_v1" "tasknote_stg" {
metadata {
name = "tasknote-stg"
@@ -186,7 +191,7 @@ resource "kubernetes_deployment_v1" "tasknote_stg_backend" {
metadata {
labels = { app = "tasknote-stg-backend" }
annotations = {
"timestamp" = timestamp()
"deploy_id" = var.deploy_version
}
}
spec {
@@ -299,7 +304,7 @@ resource "kubernetes_deployment_v1" "tasknote_stg_frontend" {
metadata {
labels = { app = "tasknote-stg-app" }
annotations = {
"timestamp" = timestamp()
"deploy_id" = var.deploy_version
}
}
spec {