-
Notifications
You must be signed in to change notification settings - Fork 17
86 lines (80 loc) · 2.22 KB
/
actions.yml
File metadata and controls
86 lines (80 loc) · 2.22 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
77
78
79
80
81
82
83
84
85
86
name: Github/actions
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
should:
runs-on: ubuntu-24.04
outputs:
run: ${{ steps.filter.outputs.run }}
steps:
- uses: envoyproxy/toolshed/gh-actions/github/should-run@b35c54c7fe7bdde2685b1f3d6b3927be0da9ffdb
id: filter
with:
config: |
paths:
- 'gh-actions/**'
- '.github/workflows/actions.yml'
gh-actions:
runs-on: ubuntu-24.04
needs: should
if: fromJSON(needs.should.outputs.run)
strategy:
fail-fast: false
matrix:
node-version:
- 20.x
name:
- appauth
- dispatch
- github/checks
- github/mutex
- github/script/run
- hashfiles
- jq
- retest
- torun
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
working-directory: gh-actions/${{ matrix.name }}
- run: npm run lint
working-directory: gh-actions/${{ matrix.name }}
- run: npm test
working-directory: gh-actions/${{ matrix.name }}
- run: |
npm run build
if [[ $(git status --porcelain) ]]; then
echo 'Built javascript does not match, did you run `npm run build`?' >&2
git status
git diff
exit 1
fi
working-directory: gh-actions/${{ matrix.name }}
status:
runs-on: ubuntu-24.04
if: >-
always()
&& github.event_name == 'pull_request'
name: Actions
needs:
- should
- gh-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"