Abrechnung und Workflow
This commit is contained in:
4
.github/workflows/prevent-wrong-pr.yml
vendored
4
.github/workflows/prevent-wrong-pr.yml
vendored
@@ -13,6 +13,8 @@ jobs:
|
||||
steps:
|
||||
- name: Prevent dev merges
|
||||
run: |
|
||||
echo "${{ github.head_ref }}";
|
||||
echo "${{ github.base_ref }}";
|
||||
if [[ "${{ github.head_ref }}" == "dev" ]]; then
|
||||
echo "ERROR: Merging 'dev' into '${{ github.base_ref }}' is forbidden!"
|
||||
exit 1
|
||||
@@ -21,6 +23,8 @@ jobs:
|
||||
- name: Allow only staging into main
|
||||
if: github.base_ref == 'main'
|
||||
run: |
|
||||
echo "${{ github.head_ref }}";
|
||||
echo "${{ github.base_ref }}";
|
||||
if [[ "${{ github.head_ref }}" != "staging" ]]; then
|
||||
echo "ERROR: Only 'staging' branch is allowed to merge into 'main'. Current: '${{ github.head_ref }}'"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user