mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
action:comment out pr_number in clang format
This commit is contained in:
parent
854efbc517
commit
4565d09c08
15
.github/workflows/auto clang format.yml
vendored
15
.github/workflows/auto clang format.yml
vendored
|
@ -27,27 +27,18 @@ jobs:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
# format the latest commit
|
# format the latest commit
|
||||||
- name: ubuntu install clang-format
|
- name: ubuntu install clang-format
|
||||||
shell: bash
|
if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
|
||||||
|
id: clang-format
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install git lsb-release wget software-properties-common
|
sudo apt-get install git lsb-release wget software-properties-common
|
||||||
wget -qO - https://apt.llvm.org/llvm.sh| sudo bash
|
wget -qO - https://apt.llvm.org/llvm.sh| sudo bash
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y clang-format
|
sudo apt-get install -y clang-format
|
||||||
git-clang-format --style=file HEAD^
|
git-clang-format --style=file HEAD^
|
||||||
echo 'The following is clang format diff if has any.' > /home/runner/work/clang-format.patch
|
|
||||||
echo '```cpp' >> /home/runner/work/clang-format.patch
|
|
||||||
git diff >> /home/runner/work/clang-format.patch
|
|
||||||
echo '```' >> /home/runner/work/clang-format.patch
|
|
||||||
|
|
||||||
|
|
||||||
- uses: EndBug/add-and-commit@v9
|
- uses: EndBug/add-and-commit@v9
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
|
if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
|
||||||
with:
|
with:
|
||||||
default_author: github_actor
|
default_author: github_actor
|
||||||
message: 🎨 apply clang-format changes
|
message: 🎨 apply clang-format changes
|
||||||
|
|
||||||
- name: PR comment with file
|
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
|
||||||
with:
|
|
||||||
filePath: /home/runner/work/clang-format.patch
|
|
||||||
pr_number: ${{ github.event.number }}
|
|
||||||
|
|
Loading…
Reference in a new issue