diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 373ca6ce2..708f273f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,12 @@ jobs: version: ${{ steps.set-version.outputs.version }} image-version: ${{ steps.set-image-version.outputs.image-version }} steps: + - name: Validate release branch + if: ${{ github.ref != 'refs/heads/main' }} + run: | + echo "::error::Releases must be triggered from the main branch. Selected ref: ${{ github.ref }}" + exit 1 + - name: Checkout code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.0 with: