-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.99 KB
/
Copy pathformat.yml
File metadata and controls
53 lines (50 loc) · 1.99 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
# This workflow is used to format the code in the repository.
name: format
on:
workflow_dispatch: # manual trigger
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# * * * * *
- cron: "30 14 * * *" # every day at 14:30 UTC (6:30 PST, 7:30 PDT)
env:
TERM: xterm-256color
DEVELOPER_DIR: /Applications/Xcode_${{ vars.XCODE_VERSION }}.app/Contents/Developer
jobs:
format:
name: Format
strategy:
fail-fast: false
timeout-minutes: 5
runs-on: ${{ vars.MACOS }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Format
run: make format
- name: Lint
run: make lint
- name: Revert Package.resolved changes # bootstrap may update Package.resolved, ignore the changes
run: |
git checkout HEAD -- "**/Package.resolved" || true
- name: Create Pull Request
if: success() || failure()
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
commit-message: "[format] format code"
committer: "Honghao Zhang <3926785+honghaoz@users.noreply.github.com>"
author: "Honghao Zhang <3926785+honghaoz@users.noreply.github.com>"
title: "[format] format code"
body: "This PR was automatically created by the [format](https://github.com/honghaoz/ComposeUI/actions/workflows/format.yml) workflow."
branch: "github-actions/format"
draft: false
delete-branch: true
add-paths: |
!**/Package.resolved