2022-08-05 22:33:34 +00:00
|
|
|
name: Reformat main
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
env:
|
|
|
|
FORCE_COLOR: 3
|
|
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
|
2022-08-05 22:56:10 +00:00
|
|
|
permissions: write-all
|
2022-08-05 22:38:22 +00:00
|
|
|
|
2022-08-05 22:33:34 +00:00
|
|
|
jobs:
|
|
|
|
prettify:
|
|
|
|
name: Auto-prettify
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Restore cached node_modules
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
- name: Install missing dependencies
|
|
|
|
run: yarn install --prefer-offline --frozen-lockfile
|
|
|
|
- name: Run Prettier on web client
|
|
|
|
working-directory: web
|
|
|
|
run: yarn format
|
|
|
|
- name: Commit any Prettier changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: Auto-prettification
|
|
|
|
branch: ${{ github.head_ref }}
|