Skip to content

Commit

Permalink
Update dotnet-format.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Charmve authored Jul 24, 2024
1 parent 86e48cb commit 0e8b190
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,35 @@ on:
placeholder:
description: "placeholder, no effect"
required: false

jobs:
check_license_and_format:
name: License and format
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}

- name: format
id: format_check
run: |
bash ./scripts/format.sh --git
- name: install clang-format
- name: install clang-format
id: clang-format
run: sudo apt install clang-format
- name: check for changes

- name: check for changes
run: |
if git diff --exit-code; then
echo "has_changes=false" >> $GITHUB_ENV
else
echo "has_changes=true" >> $GITHUB_ENV
fi
- name: Git push
if: ${{ env.has_changes == 'true' }}
id: git_push
Expand Down

0 comments on commit 0e8b190

Please sign in to comment.