2023-07-15 00:29:28 +00:00
|
|
|
name: autofix.ci
|
2023-05-16 12:09:37 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
# - dev
|
|
|
|
# - master
|
|
|
|
- staged
|
2024-03-27 09:59:47 +00:00
|
|
|
- experimental
|
2023-05-16 12:09:37 +00:00
|
|
|
paths-ignore:
|
|
|
|
- "docs/**"
|
|
|
|
# - ".github/**"
|
|
|
|
- "howto/**"
|
|
|
|
- "*.md"
|
|
|
|
- "locale/**"
|
2023-07-15 00:29:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-05-16 12:09:37 +00:00
|
|
|
jobs:
|
2023-07-27 14:45:50 +00:00
|
|
|
clang-format:
|
2023-05-16 12:09:37 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-05 08:35:50 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-16 12:09:37 +00:00
|
|
|
with:
|
2023-07-27 14:45:50 +00:00
|
|
|
|
2023-05-16 12:09:37 +00:00
|
|
|
fetch-depth: 2
|
|
|
|
# format the latest commit
|
|
|
|
- name: ubuntu install clang-format
|
|
|
|
run: |
|
2023-07-27 14:45:50 +00:00
|
|
|
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
|
2023-07-15 00:29:28 +00:00
|
|
|
|
|
|
|
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
|
|
|
|
|
|
|
|
|
|
|
|
css-js-html-format:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-05 08:35:50 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-15 00:29:28 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 2
|
2024-04-05 08:35:50 +00:00
|
|
|
- uses: actions/setup-node@v4
|
2023-07-15 00:29:28 +00:00
|
|
|
with:
|
|
|
|
node-version: 16
|
|
|
|
|
2023-07-19 13:13:40 +00:00
|
|
|
- run: npm ci
|
2023-07-15 00:29:28 +00:00
|
|
|
- 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
|
2023-07-27 14:45:50 +00:00
|
|
|
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0
|