From d0158bab83d0d9c50c6195605dee8f97619ae324 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Sat, 11 Jan 2020 18:43:32 -0500 Subject: [PATCH] ENH: Add clang-format GitHub Actions --- .github/workflows/apply-clang-format.yml | 15 +++++++++++++++ .github/workflows/clang-format-linter.yml | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/apply-clang-format.yml create mode 100644 .github/workflows/clang-format-linter.yml diff --git a/.github/workflows/apply-clang-format.yml b/.github/workflows/apply-clang-format.yml new file mode 100644 index 00000000..e4b16b9a --- /dev/null +++ b/.github/workflows/apply-clang-format.yml @@ -0,0 +1,15 @@ +name: Apply clang-format to PR + +on: + pull_request: + types: [labeled] + +jobs: + clang-format: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: InsightSoftwareConsortium/ITKApplyClangFormatAction@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/clang-format-linter.yml b/.github/workflows/clang-format-linter.yml new file mode 100644 index 00000000..69166d96 --- /dev/null +++ b/.github/workflows/clang-format-linter.yml @@ -0,0 +1,13 @@ +name: clang-format linter + +on: [push,pull_request] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 1 + - uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master