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