Skip to content

format

format #827

Workflow file for this run

# 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: "0 14 * * *" # every day at 14:00 UTC (6:00 PST, 7:00 PDT)
concurrency:
# newer commits cancel older in-flight CI on the same ref.
# scoping the group by event keeps push runs from cancelling scheduled runs (and vice versa).
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'workflow_dispatch' }}
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: 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/ChouTi/actions/workflows/format.yml) workflow."
branch: "github-actions/format"
draft: false
delete-branch: true