fix: clang format action (#1017)

* action: format

* action: format

* action: format

* Update auto format.yml

* Update .github/workflows/auto format.yml

* Update auto format.yml

* test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: shenleban tongying <shenlebantongying@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
xiaoyifang 2023-07-27 22:45:50 +08:00 committed by GitHub
parent 3283a58609
commit 97a32e3dca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,27 +15,19 @@ on:
permissions:
contents: read
jobs:
format:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.2
with:
# check out HEAD on the branch
# ref: ${{ github.head_ref }}
# repository: ${{github.event.pull_request.head.repo.full_name}}
# make sure the parent commit is grabbed as well, because
# that's what will get formatted (i.e. the most recent commit)
fetch-depth: 2
# format the latest commit
- name: ubuntu install clang-format
# if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
id: clang-format
run: |
sudo apt-get install git lsb-release wget software-properties-common
wget -qO - https://apt.llvm.org/llvm.sh| sudo bash
sudo apt-get update
sudo apt-get install -y clang-format
git-clang-format --style=file HEAD^
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install clang-format
(/home/linuxbrew/.linuxbrew/opt/clang-format/bin/git-clang-format --binary=/home/linuxbrew/.linuxbrew/opt/clang-format/bin/clang-format --style=file HEAD^) || true
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
@ -58,4 +50,4 @@ jobs:
# run: |
# shopt -s globstar
# pngquant -f --ext .png --skip-if-larger -- **/*.png
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0