Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Branch Protection

on:
pull_request:
branches:
- master

permissions:
contents: read

jobs:
check-source-branch:
runs-on: ubuntu-latest
steps:
- name: Check if PR is from develop branch
if: github.head_ref != 'develop'
run: |
echo "Error: Pull requests to master branch are only allowed from develop branch"
echo "Current source branch: ${{ github.head_ref }}"
exit 1

- name: PR from develop approved
if: github.head_ref == 'develop'
run: |
echo "✓ Pull request from develop branch to master is allowed"
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.swisspush</groupId>
<artifactId>rest-storage</artifactId>
<version>3.1.19-SNAPSHOT</version>
<version>3.1.20-SNAPSHOT</version>
<name>rest-storage</name>
<description>
Persistence for REST resources in the filesystem or a redis database
Expand Down