diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000000..94db7c9535 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,28 @@ +name: Sync with upstream + +on: + schedule: + - cron: '0 * * * *' # Runs every hour + workflow_dispatch: # Allows manual trigger + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout + + - name: Set up Git + run: | + git config user.name "Jayant-Deshmukh" + git config user.email "jayantdeshmuk008@gmail.com" + + - name: Add upstream remote and rebase + run: | + git config --global pull.rebase false + git pull https://github.com/LineageOS/android_vendor_lineage.git + + - name: Push rebased changes to origin + run: | + git push origin HEAD:fifteen-los --force-with-lease