Files
supabase/.github/workflows/autofix_linters.yml
Ivan Vasilov dd572efb0d chore: Switch repo to use pnpm (#29928)
* Fix some missing and duplicate dependencies.

* Fix the types for jest in ai-commands package.

* Replace all npm commands with pnpm. Add pnpm files and workspace links.

* Fix rimraf to work with pnpm.

* Refactor the github actions to work with pnpm.

* Delete package-lock.json.

* Fix the tailwind configs to not include node_modules.

* Fix random files.

* Add preinstall scripts to all packages.

* Fix the Dockerfile to work with pnpm.

* Update the DEVELOPERS documentation.
2024-12-20 13:07:20 +01:00

55 lines
1.4 KiB
YAML

name: Autofix Linting Checks
on:
pull_request:
types:
- labeled
permissions:
contents: write
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
autofix:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && (github.event.label.name == 'autofix') }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: apps
ref: ${{ github.head_ref }}
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.10.0
run_install: false
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install required dependencies
run: pnpm i
- name: Run Prettier in fix mode
run: pnpm run format
- name: Commit changes and push to existing branch
run: |
git config --global user.name 'github-tidy-bot'
git config --global user.email 'github-tidy-bot@supabase.com'
if [[ `git status --porcelain` ]]; then
echo "[bot] Changes detected, committing."
echo "[bot] Running in non-squash mode."
git commit -am "ci: Autofix updates from GitHub workflow"
git push
else
echo "[bot] No changes detected, nothing to commit."
fi