mirror of
https://github.com/filamentphp/plugin-skeleton.git
synced 2026-06-21 04:09:48 +08:00
Merge branch '3.x' into 4.x
This commit is contained in:
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -8,5 +8,9 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
labels:
|
labels:
|
||||||
- "dependencies"
|
- "dependencies"
|
||||||
|
- "github_actions"
|
||||||
|
|||||||
33
.github/workflows/dependabot-auto-merge.yml
vendored
33
.github/workflows/dependabot-auto-merge.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: "Dependabot Auto-Merge"
|
|
||||||
|
|
||||||
on: pull_request_target
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependabot:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Dependabot metadata
|
|
||||||
id: metadata
|
|
||||||
uses: dependabot/fetch-metadata@v2.5.0
|
|
||||||
with:
|
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
|
|
||||||
- name: Auto-merge Dependabot PRs for semver-minor updates
|
|
||||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
|
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
|
||||||
env:
|
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
|
|
||||||
- name: Auto-merge Dependabot PRs for semver-patch updates
|
|
||||||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
|
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
|
||||||
env:
|
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
|
||||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
||||||
42
.github/workflows/fix-code-style.yml
vendored
Normal file
42
.github/workflows/fix-code-style.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: fix-code-style
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**.php'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fix-code-style:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# persist-credentials: true is required so `git-auto-commit-action` below
|
||||||
|
# can push the reformatted files back to the branch.
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked]
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
|
with:
|
||||||
|
path: ~/.composer/cache/files
|
||||||
|
key: composer-cs-${{ hashFiles('composer.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
composer-cs-
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
|
||||||
|
with:
|
||||||
|
php-version: 8.4
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install --no-interaction --no-scripts
|
||||||
|
|
||||||
|
- name: Run Pint
|
||||||
|
run: ./vendor/bin/pint
|
||||||
|
|
||||||
|
- name: Commit changes
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
|
||||||
|
with:
|
||||||
|
commit_message: Fix styling
|
||||||
27
.github/workflows/fix-php-code-style-issues.yml
vendored
27
.github/workflows/fix-php-code-style-issues.yml
vendored
@@ -1,27 +0,0 @@
|
|||||||
name: "Fix PHP Code Styling"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- '**.php'
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
php-code-styling:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
ref: ${{ github.head_ref }}
|
|
||||||
|
|
||||||
- name: Fix PHP code style issues
|
|
||||||
uses: aglipanci/laravel-pint-action@2.6
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
uses: stefanzweifel/git-auto-commit-action@v7
|
|
||||||
with:
|
|
||||||
commit_message: Fix styling
|
|
||||||
58
.github/workflows/phpstan.yml
vendored
58
.github/workflows/phpstan.yml
vendored
@@ -1,26 +1,64 @@
|
|||||||
name: PHPStan
|
name: phpstan
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
pull_request:
|
||||||
- '**.php'
|
|
||||||
- 'phpstan.neon.dist'
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
phpstan:
|
phpstan:
|
||||||
name: phpstan
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
php: [8.4, 8.3, 8.2]
|
||||||
|
laravel: [12.*, 11.*]
|
||||||
|
stability: [prefer-stable]
|
||||||
|
include:
|
||||||
|
- laravel: 12.*
|
||||||
|
testbench: 10.*
|
||||||
|
- laravel: 11.*
|
||||||
|
testbench: 9.*
|
||||||
|
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
|
with:
|
||||||
|
path: ~/.composer/cache/files
|
||||||
|
key: composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
composer-${{ matrix.php }}-${{ matrix.laravel }}-
|
||||||
|
composer-${{ matrix.php }}-
|
||||||
|
|
||||||
|
- name: Cache PHPStan result
|
||||||
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
|
with:
|
||||||
|
path: /tmp/phpstan
|
||||||
|
key: phpstan-${{ matrix.php }}-${{ matrix.laravel }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
phpstan-${{ matrix.php }}-${{ matrix.laravel }}-
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
|
||||||
with:
|
with:
|
||||||
php-version: '8.2'
|
php-version: ${{ matrix.php }}
|
||||||
|
extensions: mbstring, pdo, pdo_sqlite
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
- name: Install composer dependencies
|
- name: Install dependencies
|
||||||
uses: ramsey/composer-install@v3
|
run: |
|
||||||
|
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
|
||||||
|
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||||
|
|
||||||
- name: Run PHPStan
|
- name: Run PHPStan
|
||||||
run: ./vendor/bin/phpstan --error-format=github
|
run: ./vendor/bin/phpstan --error-format=github
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
name: "Run Tests"
|
name: tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
run-tests:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
@@ -29,11 +34,21 @@ jobs:
|
|||||||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
uses: actions/checkout@v6
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Cache Composer dependencies
|
||||||
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
|
with:
|
||||||
|
path: ~/.composer/cache/files
|
||||||
|
key: composer-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.stability }}-${{ hashFiles('composer.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
composer-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-
|
||||||
|
composer-${{ matrix.os }}-${{ matrix.php }}-
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php }}
|
php-version: ${{ matrix.php }}
|
||||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
|
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
|
||||||
@@ -49,7 +64,7 @@ jobs:
|
|||||||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
|
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
|
||||||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
|
||||||
|
|
||||||
- name: List Installed Dependencies
|
- name: List installed dependencies
|
||||||
run: composer show -D
|
run: composer show -D
|
||||||
|
|
||||||
- name: Execute tests
|
- name: Execute tests
|
||||||
10
.github/workflows/update-changelog.yml
vendored
10
.github/workflows/update-changelog.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: "Update Changelog"
|
name: update-changelog
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
@@ -12,19 +12,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# persist-credentials: true is required so `git-auto-commit-action` below
|
||||||
|
# can push the CHANGELOG update.
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked]
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Update Changelog
|
- name: Update Changelog
|
||||||
uses: stefanzweifel/changelog-updater-action@v1
|
uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0
|
||||||
with:
|
with:
|
||||||
latest-version: ${{ github.event.release.name }}
|
latest-version: ${{ github.event.release.name }}
|
||||||
release-notes: ${{ github.event.release.body }}
|
release-notes: ${{ github.event.release.body }}
|
||||||
|
|
||||||
- name: Commit updated CHANGELOG
|
- name: Commit updated CHANGELOG
|
||||||
uses: stefanzweifel/git-auto-commit-action@v7
|
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
|
||||||
with:
|
with:
|
||||||
branch: main
|
branch: main
|
||||||
commit_message: Update CHANGELOG
|
commit_message: Update CHANGELOG
|
||||||
|
|||||||
28
.github/workflows/zizmor.yml
vendored
Normal file
28
.github/workflows/zizmor.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: zizmor
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/**'
|
||||||
|
- '.github/dependabot.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/**'
|
||||||
|
- '.github/dependabot.yml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zizmor:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
|
||||||
|
with:
|
||||||
|
advanced-security: false
|
||||||
Reference in New Issue
Block a user