Skip to content

Commit

Permalink
detect submodule changes using git status (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssadai authored Oct 28, 2024
1 parent 5d8da01 commit e0c5437
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/update_submodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@ jobs:
- name: Update submodule
run: |
cd data
git switch main
output=$(git pull)
git submodule update --remote -- data
output=$(git status -s data)
echo "$output"
cd ..
if [[ "$output" != *"Already up to date."* ]]; then
# Check if the status output is non-empty
if [[ -n "$output" ]]; then
./code/create_prerendered_figures.py
fi
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
Expand Down

0 comments on commit e0c5437

Please sign in to comment.