-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.15 KB
/
quality.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Quality
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Check changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
eslint: ${{ steps.filter.outputs.eslint }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
eslint:
- 'packages/eslint-plugin/**'
- 'example-app/**'
eslint-quality:
name: Eslint-Plugin Quality
needs: changes
if: ${{ needs.changes.outputs.eslint == 'true' }}
uses: ./.github/workflows/quality-eslint.yml
final-check:
name: Final Check
needs: [eslint-quality]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check previous jobs status
run: |
status=$(echo "${{ needs.eslint-quality.result }}" | tr '[:upper:]' '[:lower:]')
if [[ "$status" == *"failure"* ]]; then
echo "One or more previous jobs failed."
exit 1
else
echo "All previous jobs succeeded or were skipped."
exit 0
fi