Sync with Linus Torvalds' Linux #4
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: Sync with Linus Torvalds' Linux | |
| on: | |
| schedule: | |
| - cron: '0 3 */3 * *' # Every day at 3 AM UTC | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout your fork | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Add upstream remote | |
| run: | | |
| git remote add upstream https://github.com/torvalds/linux.git | |
| git fetch upstream | |
| - name: Merge or rebase from upstream | |
| run: | | |
| git checkout master | |
| git merge --ff-only upstream/master | |
| - name: Push to your fork | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git push origin master |