diff --git a/.github/workflows/Sync.yml b/.github/workflows/Sync.yml index 82774f60..e1a64486 100644 --- a/.github/workflows/Sync.yml +++ b/.github/workflows/Sync.yml @@ -1,4 +1,4 @@ -name: Sync Upstream +name: Sync Fork with Upstream env: UPSTREAM_URL: "https://github.com/wivrn/wivrn.git" @@ -7,20 +7,30 @@ env: on: schedule: - - cron: '0 5/6 * * *' + - cron: '0 0 * * *' workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - name: GitHub Sync to Upstream Repository - uses: dabreadman/sync-upstream-repo@v1.3.0 + - name: Checkout Forked Repository + uses: actions/checkout@v3 with: - upstream_repo: ${{ env.UPSTREAM_URL }} - upstream_branch: ${{ env.UPSTREAM_BRANCH }} 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 + run: | + git checkout ${{ env.UPSTREAM_BRANCH }} + git rebase upstream/${{ env.UPSTREAM_BRANCH }} + git push origin ${{ env.UPSTREAM_BRANCH }} + - name: Checkout stuff uses: actions/checkout@master