GitHub Actions: Add job for automatically updating the main branch
authorTom Stellard <tstellar@redhat.com>
Mon, 16 Nov 2020 19:06:58 +0000 (11:06 -0800)
committerTom Stellard <tstellar@redhat.com>
Sat, 21 Nov 2020 06:26:11 +0000 (22:26 -0800)
Differential Revision: https://reviews.llvm.org/D91554

.github/workflows/main-branch-sync.yml [new file with mode: 0644]

diff --git a/.github/workflows/main-branch-sync.yml b/.github/workflows/main-branch-sync.yml
new file mode 100644 (file)
index 0000000..783c850
--- /dev/null
@@ -0,0 +1,19 @@
+name: main branch sync
+
+on:
+  push:
+    branches:
+      - 'master'
+
+jobs:
+  branch_sync:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+
+      - name: Update branch
+        run: |
+          git push https://${{ github.token }}@github.com/${{ github.repository }} HEAD:temp-test-main