Skip to content

Commit

Permalink
New output mechanism in workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Sep 20, 2024
1 parent 1a12ee1 commit a527837
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ jobs:
run: rm -rf models/*
- name: Run a fresh model sync.
run: python3 sync.py
- name: Check if there is any change
id: get_changes
run: echo "::set-output name=changed::$(git status --porcelain | wc -l)"
- name: Check for changes
id: check_changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT";
fi
- name: If there are changes, fail.
if: steps.get_changes.outputs.changed != 0
if: steps.check_changes.outputs.changed != 0
run: exit 1

0 comments on commit a527837

Please sign in to comment.