Sync with upstream #70
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: "30 22 * * *" | |
workflow_dispatch: | |
jobs: | |
merge-upstream: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup git | |
run: | | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git config --global user.name 'github-actions[bot]' | |
git config --global pull.rebase false | |
- name: Merge changes from main | |
run: | | |
git pull https://github.com/KillianLucas/open-interpreter main --no-edit | |
- name: Compare changes | |
id: compare | |
run: | | |
git diff --name-only HEAD origin/main | |
echo "changes=$(git diff --name-only HEAD origin/main | tr '\n' ' ')" >> "$GITHUB_OUTPUT" | |
- name: Push all changes | |
if: ${{ steps.compare.outputs.changes != '' }} | |
run: | | |
git push origin main |