Skip to content

GitHub Actions: Add Auto Pint #37

GitHub Actions: Add Auto Pint

GitHub Actions: Add Auto Pint #37

Workflow file for this run

name: Lint
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
pint:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.4']
steps:
- uses: actions/checkout@v4
- id: tmp-vars
run: echo "pint_version=$(cat composer.json | jq --raw-output '."require-dev"."laravel/pint"')" >> "$GITHUB_OUTPUT" >> $GITHUB_ENV
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: pint:${{ steps.tmp-vars.outputs.pint_version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: pint
- uses: typisttech/.github/.github/actions/create-auto-merged-pull-request@v1
with:
branch: "bot/pint/${{ github.ref_name }}"
title: ':robot: `pint`'
labels: |
bot
pint
pr-write-pat-token: ${{ secrets.token }} # TODO
token: ${{ secrets.token }}