Update dprint plugins #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: write | |
pull-requests: write | |
# Allow one concurrent updates | |
concurrency: | |
group: 'dprint' | |
cancel-in-progress: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- id: update-dprint-plugins | |
uses: kachick/[email protected] | |
with: | |
base-branch: 'main' | |
# Keep same version as used in *.nix | |
dprint-version: '0.37.1' | |
# Enable `Allow auto-merge` in your repository settings if you need following steps | |
- name: Merge sent PR | |
# Merge if `dprint fmt` does not make any diff even after updating plugins | |
if: ${{ steps.update-dprint-plugins.outputs.pr_url != '' && steps.update-dprint-plugins.outputs.fmt == 'false' }} | |
run: gh pr merge --auto --squash --delete-branch "${{ steps.update-dprint-plugins.outputs.pr_url }}" | |
env: | |
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |