41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: "Quality Control: Trunk Upgrade"
|
|
|
|
permissions: read-all
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .trunk/trunk.yaml
|
|
- .github/workflows/trunk.upgrade.yml
|
|
schedule:
|
|
- cron: "0 11 * * 1" # 11am Tooling Monday
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
trunk-upgrade:
|
|
name: Upgrade Trunk
|
|
runs-on: ${{ vars.RUNS_ON || 'ubuntu-latest' }}
|
|
permissions:
|
|
contents: write # For trunk to create PRs
|
|
pull-requests: write # For trunk to create PRs
|
|
steps:
|
|
- uses: benzine-framework/action-setup-php@main
|
|
- name: "Trunk Upgrade"
|
|
uses: trunk-io/trunk-action/upgrade@v1
|
|
- name: "PR: Find Pull Request"
|
|
uses: juliangruber/find-pull-request-action@v1
|
|
id: find-pull-request
|
|
with:
|
|
labels: trunk
|
|
- name: "PR: Enable Pull Request Automerge"
|
|
continue-on-error: true
|
|
uses: peter-evans/enable-pull-request-automerge@v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
pull-request-number: ${{ steps.find-pull-request.outputs.number }}
|