GitHub Action to update dprint plugins in dprint.json
An example workflow in your repository, assuming it is named .github/workflows/dprint-update-plugin.yml
.
name: Update dprint plugins
on:
push:
branches: ['main']
paths:
- '.github/workflows/dprint-update-plugin.yml'
schedule:
- cron: '0 17 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
pull-requests: write
# Allow one concurrent updates
concurrency:
group: 'dprint'
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: kachick/action-update-dprint-plugins@v0.1.0
with:
base-branch: 'main'
github-token: "${{ secrets.GITHUB_TOKEN }}"
# auto-merge: false # default: true
All options should be specified with string. So true/false should be 'true'/'false'
name | default | options | description |
---|---|---|---|
base-branch | (null) | e.g 'main' | The branch into which you want updating PR merged |
github-token | (null) | e.g "${{ secrets.GITHUB_TOKEN }}" | The token will be used to create PR |
auto-merge | 'true' | 'true', 'false' | The updating PR will be auto merged if no change exist even after dprint fmt |
- A solution with renovatebot is here, but it may not update some plugins like dprint-plugin-prettier