Initial import #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linting | |
# Always run on Pull Requests as then these checks can be marked as required. | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: {} | |
jobs: | |
shell-check: | |
name: ShellCheck | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Add error parser | |
run: echo -n "::add-matcher::shellcheck-matcher.json" | |
- name: Run ShellCheck | |
uses: ludeeus/[email protected] | |
with: | |
format: gcc | |
linting-summary: | |
name: Linting Summary | |
runs-on: ubuntu-22.04 | |
needs: [shell-check] | |
if: (!cancelled()) | |
steps: | |
- name: Check if any job failed | |
run: | | |
if [[ -z "$(echo "${{ join(needs.*.result, '') }}" | sed -e 's/success//g')" ]]; then | |
echo "All jobs succeeded" | |
else | |
echo "One or more jobs did not succeed" | |
exit 1 | |
fi |