Sync with upstream #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync with upstream | |
on: | |
schedule: | |
- cron: '*/6 * * * *' # Runs every 5 minutes | |
workflow_dispatch: # Allows manual trigger | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Git | |
run: | | |
git config user.name "Jayant-Deshmukh" | |
git config user.email "[email protected]" | |
- name: Add upstream remote and rebase | |
run: | | |
git config --global pull.rebase true | |
# Extract the repository name from the GitHub repository context | |
REPO_NAME="${GITHUB_REPOSITORY##*/}" | |
git pull https://github.com/LineageOS/android_${REPO_NAME}.git lineage-22.1 | |
- name: Push rebased changes to origin | |
run: | | |
git push origin HEAD:fifteen-los --force-with-lease |