Skip to content

TrebleDroid-Sync

TrebleDroid-Sync #44

Workflow file for this run

name: TrebleDroid-Sync
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
sync-bot:
runs-on: ubuntu-latest
steps:
- name: Checkout duo-de
uses: actions/checkout@v3
- name: Checkout treble_aosp
uses: actions/checkout@v3
with:
repository: ponces/treble_aosp
path: treble_aosp
- name: Replace folder
run: |
rm -rf ./patches/trebledroid
cp -R ./treble_aosp/patches/trebledroid ./patches/trebledroid
rm -rf ./patches/personal
cp -R ./treble_aosp/patches/personal ./patches/personal
rm -rf ./treble_aosp
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit changes
id: commit_changes
run: |
git add .
if git diff-index --quiet HEAD; then
echo "No changes to commit"
echo "changes=false" >> $GITHUB_OUTPUT
else
git commit -m "feat: sync with latest sources of TrebleDroid [via Ponces]"
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v5
if: steps.commit_changes.outputs.changes == 'true'
with:
commit-message: "feat: sync with latest sources of TrebleDroid [via Ponces]"
branch: sync-bot
base: main-15
title: "TrebleDroid patches"
body: "This PR updates the patches from TrebleDroid."
labels: 'automated-pr'