diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 6a0ca3b72fc..f5603528ce1 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -18,6 +18,16 @@ jobs: env: RELEASE_NAME: "${{ inputs.tag }}" steps: + - name: Check default branch + run: | + echo "github.ref_name=${{ github.ref_name }}" + echo "github.event.repository.default_branch=${{ github.event.repository.default_branch }}" + if [[ ${{ github.ref_name }} != ${{ github.event.repository.default_branch }} ]] + then + echo "This workflow can only be run on default branch" + exit 1 + fi + - name: Pre-process Release Name id: pre_process_release_name run: |