From edd14d9cf13bf0a683939bcc73fd22074e183a9a Mon Sep 17 00:00:00 2001 From: nayonsoso Date: Sat, 14 Dec 2024 05:42:15 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20release=20cd=EB=A5=BC=20=EB=8F=8C?= =?UTF-8?q?=EB=A6=B4=20=EC=88=98=20=EC=9E=88=EB=8A=94=20=EB=B8=8C=EB=9E=9C?= =?UTF-8?q?=EC=B9=98=20=ED=95=9C=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend-prod-cd.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/backend-prod-cd.yml b/.github/workflows/backend-prod-cd.yml index f3958ba9e..2033f023c 100644 --- a/.github/workflows/backend-prod-cd.yml +++ b/.github/workflows/backend-prod-cd.yml @@ -7,6 +7,17 @@ env: APPLICATION_DIRECTORY: /home/ubuntu/review-me jobs: + check-branch: + name: Check branch name + runs-on: ubuntu-latest + steps: + - name: Check branch name + if: ${{ github.ref_name != 'release' && !startsWith(github.ref_name, 'hotfix/') }} + run: | + echo "This workflow can only run on 'release' branch or branches starting with 'hotfix/'" + echo "Current branch: ${{ github.ref_name }}" + exit 1 + build: name: Build Dockerfile and push to DockerHub runs-on: ubuntu-latest