ADD Action(Clang Format) (#3405)

ADD Action(Clang Format)
This commit is contained in:
fish9167
2021-04-15 09:40:03 +08:00
committed by GitHub
parent f62ee01566
commit 100c7e14e5
+25
View File
@@ -0,0 +1,25 @@
# Name of the workflow
name: Check Clang Format
#on: [push, pull_request]
on:
pull_request:
types: [closed]
jobs:
clang-format:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it
- uses: actions/checkout@v2
# Applies clang-format to all C/C++ files w/ the specified style
- name: Check clang-format
uses: fish9167/clang-format-action@master
id: formatting
with:
style: 'file'
- name: Get the output message
run: echo "${{ steps.formatting.outputs.message }}"