From 338141daef85ad366c04422a3088abc1e2db4c53 Mon Sep 17 00:00:00 2001 From: Silabs-ThieuVu <65759766+Silabs-ThieuVu@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:13:18 +0700 Subject: [PATCH] Update 00-Check_Coding_Convention.yaml --- .github/workflows/00-Check_Coding_Convention.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/00-Check_Coding_Convention.yaml b/.github/workflows/00-Check_Coding_Convention.yaml index 4bf46b8f..369eaaa2 100644 --- a/.github/workflows/00-Check_Coding_Convention.yaml +++ b/.github/workflows/00-Check_Coding_Convention.yaml @@ -24,10 +24,20 @@ jobs: steps: - name: Trigger run: echo "Triggered by ${{github.event_name}} event" + + - name: Check Branch Input + run: | + if [ -z "${{ github.event.inputs.branch }}" ]; then + echo "Branch input is required." + exit 1 + fi + echo "Checkout branch ${{ github.event.inputs.branch }}" + - name: Checkout uses: actions/checkout@v4.1.7 with: - ref: "${{ github.event.inputs.branch }}" + ref: "${{ github.event.inputs.branch }}" + - name: Install python3.11 if: always() run: |