-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.16 KB
/
trunk-check.yaml
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: Static analysis
on: [push]
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions: read-all
jobs:
trunk_check:
name: Trunk Check Runner
runs-on: ubuntu-latest
permissions:
checks: write # For trunk to post annotations
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Get Composer Cache Directory
id: composer-cache
run: echo "cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Restore Composer Cache
uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.cache }}
key: composer-${{ hashFiles('**/composer.json') }}
restore-keys: composer
- name: Install Dependencies
uses: nick-invision/[email protected]
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-dist --no-interaction --no-progress
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
check-mode: all