-
Notifications
You must be signed in to change notification settings - Fork 11
35 lines (33 loc) · 1003 Bytes
/
SwiftFormat.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
name: SwiftFormat
on:
pull_request:
branches: ["*"]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: swift-actions/setup-swift@v1
with:
swift-version: 5.8
- name: Cache
uses: actions/cache@v2
with:
path: build
key: ${{ runner.os }}
- name: Install Swift-Format
run: scripts/install-swift-format.sh
- name: Format
run: scripts/format-ci.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Formatting"
title: "Formatting: ${{ github.head_ref }}"
body: "@${{ github.event.pull_request.user.login }} swift-format found changes that should be applied to your branch"
branch: "formatting/${{ github.head_ref }}"
base: ${{ github.head_ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}