Mirror of Taplo for pre-commit, created with a modified version of pre-commit-mirror-maker
(see this workflow).
Add this to your .pre-commit-config.yaml
repos:
- repo: https://github.com/ComPWA/mirrors-taplo
rev: ""
hooks:
- id: taplo
then run
pre-commit autoupdate --repo https://github.com/ComPWA/mirrors-taplo
Add this to your .pre-commit-config.yaml
repos:
- repo: https://github.com/ComPWA/mirrors-taplo
rev: ""
hooks:
- id: taplo-docker
then run
pre-commit autoupdate --repo https://github.com/ComPWA/mirrors-taplo
Since it can take a several minutes to install the taplo
hook, this repository also provides a Docker container with caches for the taplo
pre-commit hook for each tag. Here's an example of how to use this container in your GitHub Actions:
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
cleanup:
container:
image: ghcr.io/compwa/mirrors-taplo:v0.8.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
name: Run taplo through pre-commit
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: git config --global --add safe.directory $(pwd)
- env:
PRE_COMMIT_HOME: /root/.cache/pre-commit
run: |
pre-commit run taplo -a
WARNING: the cache is only effective if the tag of the container is the same as the tag of the pre-commit hook in your .pre-commit-config.yaml
.