Skip to content

Commit

Permalink
ci: check for dirty tree before committing in commit step
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrani authored Aug 16, 2023
1 parent be0aa99 commit 0170e2b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ jobs:
run: |
git config --local user.name "Github Action"
git config user.email "[email protected]"
git commit -a -m "docs: bump version to ${{ steps.semver.outputs.git_tag }}"
git tag ${{ steps.semver.outputs.git_tag }}
# Check for changes
if ! git diff-index --quiet HEAD --; then
git commit -a -m "docs: bump version to ${{ steps.semver.outputs.git_tag }}"
git tag ${{ steps.semver.outputs.git_tag }}
else
echo "No changes detected. Skipping commit and tag."
fi
- name: Push Changes
if: steps.semver.outputs.version != ''
Expand All @@ -39,6 +45,7 @@ jobs:
tags: true

- name: Nightly Merge
if: steps.semver.outputs.version != ''
uses: robotology/[email protected]
with:
allow_ff: true
Expand Down

0 comments on commit 0170e2b

Please sign in to comment.