diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c54ba7c..92cd3ae 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,7 +22,6 @@ jobs: markdown: ${{ steps.filter.outputs.markdown }} markdown_files: ${{ steps.filter.outputs.markdown_files }} shellscript: ${{ steps.filter.outputs.shellscript }} - shellscript_files: ${{ steps.filter.outputs.shellscript_files }} if: ${{ !github.event.pull_request.draft }} steps: - name: Assign yourself to this PR @@ -51,7 +50,6 @@ jobs: - 'dot_profile' - 'dot_zprofile' - 'dot_zsh*' - - '!examples/**' lint: name: Lint @@ -71,14 +69,10 @@ jobs: - parallel: - name: Check formatting (shfmt) if: ${{ needs.setup.outputs.shellscript == 'true' }} - env: - SHELLSCRIPT_FILES: ${{ needs.setup.outputs.shellscript_files }} - run: shfmt -d $SHELLSCRIPT_FILES + run: find . -type f \( -name 'dot_profile' -o -name 'dot_z*' -o -name '*.sh' -o -name '*.zsh' \) | grep -Ev 'examples/*' | xargs shfmt -d - name: ShellCheck if: ${{ needs.setup.outputs.shellscript == 'true' }} - env: - SHELLSCRIPT_FILES: ${{ needs.setup.outputs.shellscript_files }} - run: shellcheck $SHELLSCRIPT_FILES + run: find . -type f \( -name 'dot_profile' -o -name 'dot_z*' -o -name '*.sh' -o -name '*.zsh' \) | grep -Ev 'examples/*' | xargs shellcheck - name: Markdown lint if: ${{ needs.setup.outputs.markdown == 'true' }} uses: DavidAnson/markdownlint-cli2-action@8de2aa07cae85fd17c0b35642db70cf5495f1d25 # v24.0.0 @@ -103,7 +97,6 @@ jobs: runs-on: ubuntu-slim timeout-minutes: 2 needs: [test] - if: ${{ !(failure() || contains(needs.*.result, 'cancelled')) }} + if: always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) steps: - - name: Exit with success - run: exit 0 + - run: exit 1