Skip to content

Commit

Permalink
chore: early abort if no commits found
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Aug 14, 2023
1 parent f2dbaa6 commit e407855
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/registry-docs-pr-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ jobs:
git config --global user.name "${{ inputs.gitUser }}"
git pull origin d-cdktf-docs-${{ github.run_id }}-${{ github.run_number }} --rebase
HAS_COMMITS=$(git log --oneline origin/main..HEAD | wc -l)
if [ $HAS_COMMITS -eq 0 ]; then
echo "No changes to commit"
exit 0
fi
gh pr create \
--title "cdktf: update documentation" \
--body "This PR was automatically created by the [cdktf-docs-conversion workflow](https://github.com/hashicorp/terraform-cdk/blob/main/.github/workflows/cdktf-provider-docs-rollout.yml)." \
Expand Down

0 comments on commit e407855

Please sign in to comment.