Skip to content

Commit

Permalink
be explicit with files for change detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Dec 16, 2022
1 parent 2745d50 commit dcc0565
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/upgrade-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
id: changes
shell: bash
run: |
sha1=$(git diff-index HEAD | awk '{print $4}')
[[ $sha1 == "0000000000000000000000000000000000000000" ]] && git update-index --really-refresh
echo "count=$(git diff-index HEAD | wc -l | xargs)" >> $GITHUB_OUTPUT
echo "files=$(git ls-files --exclude-standard --others | wc -l | xargs)" >> $GITHUB_OUTPUT
sha1=$(git diff-index HEAD ${{ matrix.package }}/requirements | awk '{print $4}')
[[ $sha1 == "0000000000000000000000000000000000000000" ]] && git update-index --really-refresh ${{ matrix.package }}/requirements
echo "count=$(git diff-index HEAD ${{ matrix.package }}/requirements | wc -l | xargs)" >> $GITHUB_OUTPUT
echo "files=$(git ls-files --exclude-standard --others ${{ matrix.package }}/requirements | wc -l | xargs)" >> $GITHUB_OUTPUT
- name: commit & push changes
if: steps.changes.outputs.count > 0 || steps.changes.outputs.files > 0
shell: bash
Expand Down

0 comments on commit dcc0565

Please sign in to comment.