rtoy is running sync 🚀 #10
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
| # .github/workflows/sync.yml | |
| name: Sync from Upstream | |
| run-name: ${{ github.actor }} is running sync 🚀 | |
| on: | |
| push: | |
| schedule: | |
| - cron: '0 * * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Add upstream and sync | |
| run: | | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git config user.name "github-actions[bot]" | |
| git remote add upstream https://git.code.sf.net/p/maxima/code | |
| git fetch upstream | |
| # Sync all branches and tags | |
| git push origin refs/remotes/upstream/*:refs/heads/* --force-with-lease | |
| git push origin --tags --force |