Skip to content

fix format

fix format #4

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / Sync to GitHub

Invalid workflow file

The workflow is not valid. .github/workflows/sync.yml (Line: 15, Col: 9): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.SYNC_GITHUB_TOKEN != ''
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