Skip to content

Commit

Permalink
Merge pull request #746 from aws/dev
Browse files Browse the repository at this point in the history
ci: doc generator step was failing to push if there are no changes
  • Loading branch information
ashovlin authored Jan 13, 2023
2 parents 27a8719 + 5643b7a commit e8f4ad1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/doc-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ jobs:
run: |
cd ./src/AWS.Deploy.DocGenerator
dotnet run --project ./AWS.Deploy.DocGenerator.csproj
- name: Check For Git Untracked Changes
id: gitcheck
shell: pwsh
run: |
$newFiles=$(git ls-files --others --exclude-standard | wc -l)
$modifiedFiles=$(git diff --name-only | wc -l)
"newFiles=$newFiles" >> $env:GITHUB_OUTPUT
"modifiedFiles=$modifiedFiles" >> $env:GITHUB_OUTPUT
- name: Commit and Push next version
if: steps.gitcheck.outputs.newFiles != 0 || steps.gitcheck.outputs.modifiedFiles != 0
id: commit-push
run: |
git config --global user.email "[email protected]"
Expand Down

0 comments on commit e8f4ad1

Please sign in to comment.