Skip to content

chore: Bump GH macOS runner #3783

chore: Bump GH macOS runner

chore: Bump GH macOS runner #3783

Workflow file for this run

name: format code
on:
pull_request:
jobs:
format-code:
name: Format Code
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Format C, C++, Objective-C and header files
run: >
find samples/. -type f
-name "*.h"
-o -name "*.c"
-o -name "*.cpp"
-o -name "*.m"
| xargs clang-format -i -style=file
- name: Format C# Code Whitespace
run: dotnet format whitespace Sentry.Unity.sln --exclude src/sentry-dotnet --verbosity diag
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
# we need to pass the current branch, otherwise we can't commit the changes.
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
- name: Commit Formatted Code
run: ./scripts/commit-formatted-code.sh $GITHUB_HEAD_REF