From f1ac3a2691b26c97e9acabc27b0653d6b044a62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Caiado?= Date: Tue, 5 Mar 2024 15:45:17 +0000 Subject: [PATCH] ci(tasj-nr): validate release branch (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: AndreĢ Caiado da Silva --- .github/workflows/CI-CD.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/CI-CD.yml b/.github/workflows/CI-CD.yml index 9f96a88..3251b48 100644 --- a/.github/workflows/CI-CD.yml +++ b/.github/workflows/CI-CD.yml @@ -23,6 +23,13 @@ jobs: deploy: ${{ steps.set-deploy.outputs.DEPLOY }} environment: ${{ steps.set-deploy.outputs.ENVIRONMENT }} steps: + - name: Validate release target branch + if: ${{ github.event_name == 'release' }} + run: | + if [[ "${{ github.event.release.target_commitish }}" != "main" ]]; then + echo "Release target branch is not main" + exit 1 + fi - name: Set tag version id: set-tag-version shell: bash