fix: replace timestamp by git runner on staging deploy
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user