-
Notifications
You must be signed in to change notification settings - Fork 199
46 lines (40 loc) · 1 KB
/
swiftlint.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
name: SwiftLint
on:
workflow_dispatch:
workflow_call:
inputs:
identifier:
required: true
type: string
push:
branches-ignore:
- main
- v1
- release
- release-v1
permissions:
contents: read
concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main'}}
jobs:
run-swiftlint:
runs-on: ubuntu-latest
container:
image: ghcr.io/realm/swiftlint:0.54.0
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
with:
persist-credentials: false
- name: SwiftLint
run: |
swiftlint --reporter github-actions-logging
confirm-pass:
runs-on: ubuntu-latest
name: Confirm Passing SwiftLint
if: ${{ !cancelled() }}
needs: [ run-swiftlint ]
env:
EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
steps:
- run: exit $EXIT_CODE