Skip to content

Commit d319c73

Browse files
author
Petr Sramek
committed
kjhk
1 parent 5731e24 commit d319c73

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/format-cs-files.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,20 @@ jobs:
4242
dotnet format analyzers --diagnostics IDE0073 --verbosity diagnostic
4343
working-directory: ${{ github.workspace }}
4444
- name: Validate with .NET ${{ vars.DOTNET_SDK_VERSION }}
45-
id: git
45+
id: validate
4646
shell: bash
4747
run: |
4848
set +e
4949
git diff --quiet --exit-code --cached
50-
exitcode="$?"
51-
echo has-changes=$exitcode >> $GITHUB_OUTPUT
50+
echo has-changes="$?" >> $GITHUB_OUTPUT
5251
set -e
5352
working-directory: ${{ github.workspace }}
5453
- name: Push to ${{ github.ref }}
55-
# if: ${{ steps.git.outputs.has-changes == '1' }}
54+
if: ${{ fromJSON(steps.validate.outputs.has-changes) == 1 }}
5655
run: |
57-
echo ${{ steps.git.outputs.has-changes }}
58-
echo ${{ fromJSON(steps.git.outputs.has-changes) }}
59-
echo ${{ steps.git.outputs.has-changes == '1' }}
60-
echo ${{ fromJSON(steps.git.outputs.has-changes) == 1 }}
61-
echo ${{ fromJSON(steps.git.outputs.has-changes) == '1' }}
56+
echo ${{ steps.validate.outputs.has-changes }}
57+
echo ${{ fromJSON(steps.validate.outputs.has-changes) }}
58+
echo ${{ fromJSON(steps.validate.outputs.has-changes) == 1 }}
6259
git add .
6360
git config user.name "$(git log -n 1 --pretty=format:%an)"
6461
git config user.email "$(git log -n 1 --pretty=format:%ae)"

0 commit comments

Comments
 (0)