mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
97a32e3dca
* 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>
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: autofix.ci
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
# - dev
|
|
# - master
|
|
- staged
|
|
paths-ignore:
|
|
- "docs/**"
|
|
# - ".github/**"
|
|
- "howto/**"
|
|
- "*.md"
|
|
- "locale/**"
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
clang-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3.5.2
|
|
with:
|
|
|
|
fetch-depth: 2
|
|
# format the latest commit
|
|
- name: ubuntu install clang-format
|
|
run: |
|
|
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
|
|
|
|
|
|
css-js-html-format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- run: npm ci
|
|
- run: npx prettier --write src/stylesheets src/scripts/gd-*.js
|
|
# Optimize all PNGs with https://pngquant.org/
|
|
# - run: sudo apt-get update && sudo apt-get install -y pngquant
|
|
# - name: Run pngquant
|
|
# run: |
|
|
# shopt -s globstar
|
|
# pngquant -f --ext .png --skip-if-larger -- **/*.png
|
|
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
|