Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.github/workflows/enforce-stg-source.yml @feuerswut
.github/workflows/sync-stg-with-main.yml @feuerswut
22 changes: 22 additions & 0 deletions .github/workflows/enforce-stg-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Enforce stg source

on:
pull_request:
types: [opened, synchronize, reopened, edited, ready_for_review]
branches: [main]

permissions:
contents: read

jobs:
check-source:
name: enforce-stg-source
runs-on: ubuntu-latest
steps:
- name: Verify PR originates from stg
run: |
if [ "${{ github.event.pull_request.head.ref }}" != "stg" ]; then
echo "Only the 'stg' branch may open pull requests into 'main'. Got head ref: ${{ github.event.pull_request.head.ref }}"
exit 1
fi
echo "OK: PR originates from stg"
25 changes: 25 additions & 0 deletions .github/workflows/sync-stg-with-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Sync stg with main

on:
push:
branches: [main]
workflow_dispatch: {}

permissions:
contents: write

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: stg
fetch-depth: 0
- name: Fast-forward or merge main into stg
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin main
git merge origin/main --no-edit
git push origin HEAD:stg
Loading