From dfc43901ef6b941553897953c0e57d8e3ffe5718 Mon Sep 17 00:00:00 2001 From: OpenCode Date: Mon, 9 Feb 2026 05:47:22 +0700 Subject: [PATCH] feat: Add GitHub Actions workflow to prevent merging to main from non-dev branches --- .github/workflows/var-branch.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/var-branch.yml diff --git a/.github/workflows/var-branch.yml b/.github/workflows/var-branch.yml new file mode 100644 index 0000000..57af4cf --- /dev/null +++ b/.github/workflows/var-branch.yml @@ -0,0 +1,15 @@ +name: Var branch main +on: + pull_request: + branches: + - main + +jobs: + check-branch: + runs-on: ubuntu-latest + steps: + - name: Verify source branch + if: github.head_ref != 'dev' + run: | + echo "Error: Don't merge to main!" + exit 1 \ No newline at end of file