Skip to content

Commit

Permalink
ci: Update Notebook Linter to work with multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
holtskinner committed Jul 19, 2024
1 parent 1e579ed commit 7bdd6d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint-notebooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ jobs:
- name: Find changed .ipynb files
id: changed_files
run: |
echo "changed_files=$(git diff --name-only origin/main...HEAD | grep '\.ipynb$')" >> $GITHUB_OUTPUT
changed_files=$(git diff --name-only origin/main...HEAD | grep '\.ipynb$' | tr '\n' ' ')
echo "changed_files=$changed_files" >> $GITHUB_OUTPUT
- name: Run linter on changed files
if: steps.changed_files.outputs.changed_files != ''
run: |
for file in ${{ steps.changed_files.outputs.changed_files }}; do
changed_files=(${{ steps.changed_files.outputs.changed_files }})
for file in "${changed_files[@]}"; do
docker run -v ${PWD}:/setup/app gcr.io/cloud-devrel-public-resources/notebook_linter:latest $file
done

0 comments on commit 7bdd6d7

Please sign in to comment.