File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -42,23 +42,20 @@ jobs:
42
42
dotnet format analyzers --diagnostics IDE0073 --verbosity diagnostic
43
43
working-directory : ${{ github.workspace }}
44
44
- name : Validate with .NET ${{ vars.DOTNET_SDK_VERSION }}
45
- id : git
45
+ id : validate
46
46
shell : bash
47
47
run : |
48
48
set +e
49
49
git diff --quiet --exit-code --cached
50
- exitcode="$?"
51
- echo has-changes=$exitcode >> $GITHUB_OUTPUT
50
+ echo has-changes="$?" >> $GITHUB_OUTPUT
52
51
set -e
53
52
working-directory : ${{ github.workspace }}
54
53
- name : Push to ${{ github.ref }}
55
- # if: ${{ steps.git .outputs.has-changes == '1' }}
54
+ if : ${{ fromJSON( steps.validate .outputs.has-changes) == 1 }}
56
55
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 }}
62
59
git add .
63
60
git config user.name "$(git log -n 1 --pretty=format:%an)"
64
61
git config user.email "$(git log -n 1 --pretty=format:%ae)"
You can’t perform that action at this time.
0 commit comments