diff --git a/.github/pull.yml b/.github/pull.yml new file mode 100644 index 00000000..397643b9 --- /dev/null +++ b/.github/pull.yml @@ -0,0 +1,6 @@ +version: "1" +rules: + - base: master + upstream: WiVRn:master + mergeMethod: hardreset + \ No newline at end of file diff --git a/.github/workflows/Sync.yml b/.github/workflows/Sync.yml index a185cebc..82774f60 100644 --- a/.github/workflows/Sync.yml +++ b/.github/workflows/Sync.yml @@ -1,4 +1,4 @@ -name: Sync Fork with Upstream +name: Sync Upstream env: UPSTREAM_URL: "https://github.com/wivrn/wivrn.git" @@ -6,46 +6,37 @@ env: UPSTREAM_BRANCH: "master" on: - workflow_dispatch: schedule: - - cron: '0 0 * * *' + - cron: '0 5/6 * * *' + workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v4 + - name: GitHub Sync to Upstream Repository + uses: dabreadman/sync-upstream-repo@v1.3.0 with: - upstream_repo: vindicus999/wivrn - fetch-depth: 0 + upstream_repo: ${{ env.UPSTREAM_URL }} + upstream_branch: ${{ env.UPSTREAM_BRANCH }} token: ${{ env.WORKFLOW_TOKEN }} - - name: Add upstream - run: | - git remote add upstream ${{ env.UPSTREAM_URL }} + - name: Checkout stuff + uses: actions/checkout@master - - name: Fetch all - run: | - git fetch origin - git fetch upstream + - name: Merge master -> apk-build + uses: devmasx/merge-branch@master + with: + type: now + from_branch: master + target_branch: apk-build + github_token: ${{ env.WORKFLOW_TOKEN }} - - name: Update sync branch - run: | - git config --global user.email "sneed@feedandse.edu" - git config --global user.name "Sneed Chuckinson" - git checkout -B sync upstream/master - git push origin sync --force + - name: Merge sneed -> apk-build + uses: devmasx/merge-branch@master + with: + type: now + from_branch: sneed + target_branch: apk-build + github_token: ${{ env.WORKFLOW_TOKEN }} - - name: Copy master -> apk-build - run: | - git checkout -B apk-build sync - git push origin apk-build --force - - - name: Apply sneed changes - run: | - git merge origin/sneed --no-edit - - - name: Push apk build - run: | - git push origin apk-build --force