From 3fdd343fce27703f1b1de93f06a38f2ab025596f Mon Sep 17 00:00:00 2001 From: Gabriel Moreno Date: Sat, 3 Jan 2026 11:41:06 -0400 Subject: [PATCH] feat: update ci workflows --- .github/workflows/ci.yml | 4 ++-- .github/workflows/enforce-branch.yml | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/enforce-branch.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b46d78b..12b0ed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [main] + branches: [main, development] pull_request: - branches: [main] + branches: [main, development] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/enforce-branch.yml b/.github/workflows/enforce-branch.yml new file mode 100644 index 0000000..5fd7ac2 --- /dev/null +++ b/.github/workflows/enforce-branch.yml @@ -0,0 +1,21 @@ +name: Enforce Branch Policy + +on: + pull_request: + branches: [main] + +jobs: + check-source-branch: + name: Verify PR Source + runs-on: ubuntu-latest + steps: + - name: Check if PR is from development + if: github.head_ref != 'development' + run: | + echo "❌ PRs to main must come from the development branch." + echo " Source branch: ${{ github.head_ref }}" + echo " Expected: development" + exit 1 + - name: PR source is valid + if: github.head_ref == 'development' + run: echo "✅ PR is from development branch"