diff --git a/.github/workflows/integrity.yml b/.github/workflows/integrity.yml index a1f1e08..f6be364 100644 --- a/.github/workflows/integrity.yml +++ b/.github/workflows/integrity.yml @@ -6,9 +6,9 @@ jobs: name: check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Python. - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' @@ -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 \ No newline at end of file