Added test worrkflow file #1
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/propagate-config.yml | |
| # This workflow keeps repos in sync | |
| name: Propagate Config File | |
| on: | |
| push: | |
| branches: | |
| # - main | |
| - test | |
| # paths: | |
| # - package.json # Adjust as needed | |
| jobs: | |
| propagate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Git | |
| run: | | |
| git config --global user.name "Clear Notebook Outputs Action" | |
| git config --global user.email "[email protected]" | |
| - name: Clear notebook outputs in target repos and create PRs | |
| run: | | |
| # Get all notebook files | |
| files=$(git ls-files '*.ipynb') | |
| [ -z "$files" ] && exit 0 | |
| for f in $files; do | |
| echo $f | |
| # Clear outputs + execution_count in place | |
| jupyter nbconvert \ | |
| --ClearOutputPreprocessor.enabled=True \ | |
| --inplace "$f" | |
| # Re-stage cleaned file | |
| git add "$f" | |
| done | |
| git commit -m "Clear notebook outputs" --no-verify |