fix format #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 to GitHub | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - main | ||
| - dev | ||
| workflow_dispatch: | ||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| # Only run if SYNC_GITHUB_TOKEN secret is set | ||
| if: ${{ secrets.SYNC_GITHUB_TOKEN != '' }} | ||
|
Check failure on line 15 in .github/workflows/sync.yml
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Add GitHub remote | ||
| run: | | ||
| git remote add github https://github.com/cloudQuant/backtrader.git || true | ||
| git remote -v | ||
| - name: Push to GitHub | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.SYNC_GITHUB_TOKEN }} | ||
| run: | | ||
| # Configure git | ||
| git config --global user.name "GitHub Actions" | ||
| git config --global user.email "actions@github.com" | ||
| # Push all branches and tags | ||
| git push https://${GITHUB_TOKEN}@github.com/cloudQuant/backtrader.git --all --force | ||
| git push https://${GITHUB_TOKEN}@github.com/cloudQuant/backtrader.git --tags --force | ||