TrebleDroid-Sync #15
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 | |
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 ./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 "::set-output name=changes::false" | |
else | |
git commit -m "feat: sync with latest sources of TrebleDroid [via Ponces]" | |
echo "::set-output name=changes::true" | |
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-14 | |
title: "TrebleDroid patches" | |
body: "This PR updates the patches from TrebleDroid." | |
labels: 'automated-pr' |