Auto Merge from Upstream #7841
This file contains hidden or 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: Auto Merge from Upstream | |
| on: | |
| schedule: | |
| - cron: '0 * * * *' # Runs every day at 3:00 AM UTC | |
| workflow_dispatch: # Also allows manual trigger | |
| jobs: | |
| merge: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 300 | |
| token: ${{ secrets.PUSH_PAT }} | |
| - name: Set up Git identity | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Add upstream remote and fetch | |
| run: | | |
| git remote add upstream https://github.com/conan-io/conan-center-index.git | |
| git fetch upstream HEAD:upstream-head | |
| - run: git merge --no-edit upstream-head | |
| - name: Push if merge was successful | |
| run: | | |
| if git diff --quiet && git status --porcelain | grep -q "^UU"; then | |
| echo "Merge conflicts detected, not pushing." | |
| exit 1 | |
| fi | |
| git push origin |