diff --git a/.github/workflows/Sync.yml b/.github/workflows/Sync.yml index e1a64486..f5c0d04f 100644 --- a/.github/workflows/Sync.yml +++ b/.github/workflows/Sync.yml @@ -6,47 +6,44 @@ env: UPSTREAM_BRANCH: "master" on: + workflow_dispatch: schedule: - cron: '0 0 * * *' - workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout Forked Repository - uses: actions/checkout@v3 + - name: Checkout repo + uses: actions/checkout@v4 with: + upstream_repo: vindicus999/wivrn + fetch-depth: 0 token: ${{ env.WORKFLOW_TOKEN }} - - name: Add Upstream Remote - run: git remote add upstream ${{ env.UPSTREAM_URL }} - - - name: Fetch Upstream Changes - run: git fetch upstream - - - name: Merge Changes and Push + - name: Add upstream run: | - git checkout ${{ env.UPSTREAM_BRANCH }} - git rebase upstream/${{ env.UPSTREAM_BRANCH }} - git push origin ${{ env.UPSTREAM_BRANCH }} + 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 checkout -B master upstream/master + git push origin master --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 master + 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 build --force