Skip to content

Commit

Permalink
Check linting with actionlint
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Jul 13, 2023
1 parent 011985c commit 21e2f53
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/required-workflows/hygiene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ jobs:
- name: Set-up Homebrew
uses: Homebrew/actions/setup-homebrew@master

# Dependencies
- run: brew install shellcheck shfmt
- name: Install dependencies
run: brew install actionlint shellcheck shfmt

# Enable only if Makefile exists
- id: makefile
- name: Check linting with actionlint
run: |
if [ -d .github/workflows ]; then
actionlint
else
echo "::warning title=No .github/workflows directory::No .github/workflows directory found, skipping actionlint"
fi
- name: Check if Makefile exists
id: makefile
run: |
if [ -f Makefile ]; then
echo "exists=true" >>"$GITHUB_OUTPUT"
Expand All @@ -29,10 +37,10 @@ jobs:
echo "::warning title=No Makefile::No Makefile found, skipping linting and formatting checks"
fi
# Check formatting with shfmt
- run: make format-check
- name: Check formatting with shfmt
run: make format-check
if: ${{ steps.makefile.outputs.exists == 'true' }}

# Check linting with shellcheck
- run: make lint
- name: Check linting with shellcheck
run: make lint
if: ${{ steps.makefile.outputs.exists == 'true' }}

0 comments on commit 21e2f53

Please sign in to comment.