Skip to content

Clang Format and PR

Clang Format and PR #3

Workflow file for this run

name: clangFormat
run-name: Clang Format and PR
on:
pull_request_target:
types: [closed]
branches: [develop]
jobs:
checkout-clang-pr:
runs-on: ubuntu-latest
if: ${{ (github.event.pull_request.merged == true) && (startsWith(github.base_ref, 'develop')) }}
permissions:
contents: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v4
- name: Install dependencies on ubuntu
run: |
sudo apt-get update
sudo apt-get install clang-format
- name: Format code
run: |
find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
commit-message: clang formatted code
branch: clangFormattedCode
signoff: true
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
title: Fixed the format or your nice code
body: Every time you change the format, I am here to undo your changes.