From 7b35398e05e93da249c9975dd48f0b62446c6373 Mon Sep 17 00:00:00 2001 From: dal Date: Fri, 22 Aug 2025 12:42:32 -0600 Subject: [PATCH] delpoy on staging and main --- .github/workflows/deploy.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ccb4dbdcc..62b851d07 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,7 +8,7 @@ on: jobs: deploy: - if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'staging') }} + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: blacksmith-2vcpu-ubuntu-2404 environment: ${{ github.event.workflow_run.head_branch }} @@ -32,7 +32,13 @@ jobs: run: | BRANCH="${{ github.event.workflow_run.head_branch }}" SHA="${{ steps.commit.outputs.sha_short }}" - TAG="${BRANCH}-${SHA}" + + # Determine the image tag based on branch + if [[ "${BRANCH}" == "main" ]]; then + TAG="${SHA}" + else + TAG="${BRANCH}-${SHA}" + fi echo "🚀 Deploying to ${BRANCH} environment..." echo "📦 Using image tag: ${TAG}"