sync-fork-daily-once #197
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-fork-daily-once | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: { } | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| - name: Sync fork | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git remote add upstream https://github.com/curl/curl.git | |
| git fetch upstream | |
| git checkout ${{ github.ref_name }} | |
| git merge --no-ff --no-commit upstream/${{ github.ref_name }} | |
| git reset HEAD .github/workflows | |
| git checkout -- .github/workflows | |
| git commit -m "Sync with upstream (excluding workflows)" | |
| git push origin ${{ github.ref_name }} |