-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (63 loc) · 2.18 KB
/
codestyle.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
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
name: codestyle
# Commits made in here will not trigger any workflows
# Checkout Duster's documentation for a workaround
on:
pull_request:
branches: [development, dev, acceptance, staging, main, master]
jobs:
skip-duplicates:
continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
cancel_others: "true"
concurrent_skipping: "same_content"
skip_after_successful_duplicate: "true"
paths_ignore: '["**/README.md", "**/docs/**"]'
duster-fix:
needs: skip-duplicates
if: needs.skip-duplicates.outputs.should_skip != 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: "Duster Fix"
uses: tighten/duster-action@v2
with:
args: fix
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto_commit_action
with:
commit_message: Dusting
commit_user_name: GitHub Action
commit_user_email: [email protected]
- name: Ignore Duster commit in git blame
if: steps.auto_commit_action.outputs.changes_detected == 'true'
run: echo ${{ steps.auto_commit_action.outputs.commit_hash }} >> .git-blame-ignore-revs
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Ignore Dusting commit in git blame
commit_user_name: GitHub Action
commit_user_email: [email protected]
duster-lint:
needs: skip-duplicates
if: needs.skip-duplicates.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: php-actions/composer@v6
- name: "Duster Lint"
uses: tighten/duster-action@v2
with:
args: lint