Skip to content

Commit

Permalink
check if .c file was changed make check
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisamiga committed Sep 1, 2023
1 parent c1570d0 commit 23d4e31
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/makecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,16 @@ jobs:
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
# Check if latest commit changed a .c file
- name: 📝 Check if latest commit changed a .c file
id: check
run: |
if git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep -qE '.c$'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
# Run make only if a .c file changed
- name: 🏃 Running Make
if: steps.check.outputs.changed == 'true'
run: make

0 comments on commit 23d4e31

Please sign in to comment.