Skip to content
35 changes: 35 additions & 0 deletions .github/workflows/backmerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Backmerge master to staging

on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
backmerge:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Check for Pull Request
id: check
run: |
PR_LIST=$(gh pr list --base="staging" --head="master" --state="open" --json="number")
echo $PR_LIST
echo "::set-output name=pr_list::$PR_LIST"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Pull Request
run: |
if [ $PR_LIST = "[]" ]
then
gh pr create --title="Backmerge master to staging" --body="" --base="staging" --head="master"
else
echo "Open PR already exists"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_LIST: ${{ steps.check.outputs.pr_list }}
6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/README.md @samatcolumn

/foo/ @hatboysam
/foo/baz/ @hatboysam-test

/bar/ @hatboysam-test
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# testbed
# testbed - apple

Update the README. Again.
1 change: 1 addition & 0 deletions bar/file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bar/file.txt
1 change: 1 addition & 0 deletions foo/baz/file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo/baz/file.txt
1 change: 1 addition & 0 deletions foo/file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
foo/file.txt