-
Notifications
You must be signed in to change notification settings - Fork 17
76 lines (69 loc) · 1.94 KB
/
actions.yml
File metadata and controls
76 lines (69 loc) · 1.94 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Github/actions CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
request:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
tests: ${{ steps.tests.outputs.output }}
steps:
- uses: envoyproxy/toolshed/actions/github/should-run@58c7e89423b142174718999595f7c3dc7d65f33c
id: filter
with:
config: |
paths:
- 'actions/**'
- 'js/**'
- '.github/workflows/actions.yml'
- id: tests
uses: envoyproxy/toolshed/actions/bson@58c7e89423b142174718999595f7c3dc7d65f33c
with:
input: |
OUTPUT="$(find actions -path "*/tests/*.test.yml" -type f)"
filter: |
bash::output
result-filter: |
split("\n")
| map(select(length > 0))
actions:
runs-on: ubuntu-24.04
needs: request
if: >-
fromJSON(needs.request.outputs.run)
&& needs.request.outputs.tests != '[]'
strategy:
fail-fast: false
matrix:
test: ${{ fromJSON(needs.request.outputs.tests) }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run test
uses: envoyproxy/toolshed/actions/test-runner@58c7e89423b142174718999595f7c3dc7d65f33c
with:
config: ${{ matrix.test }}
name: ${{ matrix.test }}
status:
runs-on: ubuntu-24.04
if: >-
always()
&& github.event_name == 'pull_request'
name: Actions
needs:
- request
- actions
steps:
- run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" || "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs failed or were cancelled"
exit 1
fi
echo "All required jobs passed or were skipped"