File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -18,18 +18,28 @@ jobs:
1818 fetch-depth : 0
1919 ref : ${{ github.head_ref }}
2020
21+ - name : Check last commit author
22+ id : last-commit
23+ run : |
24+ AUTHOR=$(git log -1 --pretty=format:'%an')
25+ echo "author=$AUTHOR" >> $GITHUB_OUTPUT
26+
2127 - name : Setup .NET 9
28+ if : steps.last-commit.outputs.author != 'github-actions[bot]'
2229 uses : actions/setup-dotnet@v4
2330 with :
2431 dotnet-version : ' 9.0.x'
2532
2633 - name : Restore dependencies
34+ if : steps.last-commit.outputs.author != 'github-actions[bot]'
2735 run : dotnet restore
2836
2937 - name : Run generator
30- run : dotnet run --project Generator/System.Management.Generator.csproj
38+ if : steps.last-commit.outputs.author != 'github-actions[bot]'
39+ run : dotnet run --project Generator/Generator.csproj
3140
3241 - name : Check for changes
42+ if : steps.last-commit.outputs.author != 'github-actions[bot]'
3343 id : git-check
3444 run : |
3545 git config --global user.name "github-actions[bot]"
4252 fi
4353
4454 - name : Commit and push changes to PR branch
45- if : steps.git-check.outputs.no_changes == 'false'
55+ if : steps.last-commit.outputs.author != 'github-actions[bot]' && steps. git-check.outputs.no_changes == 'false'
4656 run : |
4757 git commit -m "chore(types): update generated types (PR auto-update)"
4858 git push
You can’t perform that action at this time.
0 commit comments