CI: Only run commit linter for pull requests, not pushes

This requires us to always run the CI job and check the individual jobs'
results, since only having `needs:` will not work when `lint_commits` is
potentially skipped.
This commit is contained in:
Jelle Raaijmakers 2025-03-20 11:29:33 +01:00 committed by Jelle Raaijmakers
commit bf333eaea2
Notes: github-actions[bot] 2025-03-20 10:40:26 +00:00

View file

@ -13,12 +13,17 @@ jobs:
lint_commits:
name: 'Lint Commits'
if: ${{ github.event_name == 'pull_request' }}
uses: ./.github/workflows/lint-commits.yml
# CI matrix - runs the job in lagom-template.yml with different configurations.
Lagom:
if: github.repository == 'LadybirdBrowser/ladybird'
needs: [lint_code, lint_commits]
if: |
always()
&& github.repository == 'LadybirdBrowser/ladybird'
&& needs.lint_code.result == 'success'
&& (needs.lint_commits.result == 'skipped' || needs.lint_commits.result == 'success')
strategy:
fail-fast: false