Workflow file for this run
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: Auto Pint | ||
on: | ||
workflow_call: | ||
inputs: | ||
# shivammathur/setup-php | ||
php-version: | ||
description: Setup PHP version. | ||
default: '8.3' | ||
type: string | ||
# create-auto-merged-pull-request | ||
branch: | ||
description: The pull request branch name. | ||
default: "bot/pint/${{ github.ref_name }}" | ||
type: string | ||
base: | ||
description: > | ||
The pull request base branch. | ||
Defaults to the branch checked out in the workflow. | ||
default: ${{ github.ref_name }} | ||
type: string | ||
title: | ||
description: The title of the pull request. | ||
default: ':robot: `pint`' | ||
type: string | ||
labels: | ||
description: A comma or newline separated list of labels. | ||
default: | | ||
bot | ||
pint | ||
type: string | ||
permissions: {} | ||
jobs: | ||
pint-version: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
outputs: | ||
pint-version: ${{ steps.jq.outputs.pint-version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
composer.json | ||
sparse-checkout-cone-mode: false | ||
- id: jq | ||
run: echo "pint-version=$(cat composer.json | jq --raw-output '."require-dev"."laravel/pint"')" >> "$GITHUB_OUTPUT" | ||
auto-pint: | ||
uses: typisttech/.github/.github/actions/create-auto-merged-pull-request-php@app-token | ||
needs: pint-version | ||
permissions: | ||
contents: read | ||
with: | ||
command: pint | ||
php-version: ${{ inputs.php-version }} | ||
tools: pint:${{ needs.pint-version.outputs.pint-version }} | ||
composer-install: false | ||
branch: ${{ inputs.branch }} | ||
labels: ${{ inputs.labels }} | ||
secrets: inherit |