Skip to content

setup test workflow on pr and push #2

setup test workflow on pr and push

setup test workflow on pr and push #2

Workflow file for this run

name: Format Code
on:
push:
branches:
- main
jobs:
format:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install SwiftFormat
run: brew install swiftformat
- name: Format code
run: swiftformat .
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Formatted code with SwiftFormat"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}