Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,24 @@ updates:
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
groups:
github-actions:
patterns:
- "*"
labels:
- "dependencies"

- package-ecosystem: "npm"
directory: "/docs"
schedule:
interval: "weekly"
cooldown:
default-days: 7
groups:
npm:
patterns:
- "*"
labels:
- "dependencies"
- "dependencies"
14 changes: 9 additions & 5 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: Auto-Merge

on: pull_request_target
on: pull_request

permissions:
pull-requests: write
contents: write
contents: read

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}

permissions:
pull-requests: write
contents: write

steps:

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v3.1.0
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,32 @@ jobs:
steps:
- name: Determine target branch
id: branch
env:
TAG: ${{ github.event.release.tag_name }}
REPO: ${{ github.repository }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
TAG="${{ github.event.release.tag_name }}"
MAJOR=$(echo "$TAG" | sed -E 's/^v?([0-9]+)\..*/\1/')
BRANCH="${MAJOR}.x"
if ! git ls-remote --exit-code --heads "https://github.com/${{ github.repository }}" "$BRANCH" > /dev/null 2>&1; then
BRANCH="${{ github.event.repository.default_branch }}"
if ! git ls-remote --exit-code --heads "https://github.com/$REPO" "$BRANCH" > /dev/null 2>&1; then
BRANCH="$DEFAULT_BRANCH"
fi
echo "name=${BRANCH}" >> $GITHUB_OUTPUT
echo "name=${BRANCH}" >> "$GITHUB_OUTPUT"

- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.branch.outputs.name }}

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}

- name: Open changelog PR
id: cpr
uses: peter-evans/create-pull-request@v8
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
base: ${{ steps.branch.outputs.name }}
branch: chore/changelog-${{ github.event.release.tag_name }}
Expand All @@ -54,4 +57,5 @@ jobs:
if: steps.cpr.outputs.pull-request-operation == 'created'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge --auto --squash "${{ steps.cpr.outputs.pull-request-number }}"
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
run: gh pr merge --auto --squash "$PR_NUMBER"
6 changes: 3 additions & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ jobs:
esac

- name: Checkout source branch
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.version.outputs.branch }}

- name: Checkout gh-pages
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: gh-pages
path: gh-pages

- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/laravel-pint-action@2.6
uses: aglipanci/laravel-pint-action@36de00d5f5a8a4e12d443e01671daa12a18f4c79 # 2.6

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v7
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
with:
commit_message: Fix styling
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ on:
- 'v*.*.*'

permissions:
contents: write
contents: read

jobs:
tests:
uses: ./.github/workflows/tests.yml
secrets: inherit

release:
needs: tests
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Determine release flags
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,37 @@ on:
branches: [4.x]
workflow_call:

permissions:
contents: read

jobs:
actions-pinned:
name: Actions pinned to SHA
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Assert every third-party action is pinned to a full commit SHA
run: |
unpinned=$(grep -rhoE '^[[:space:]]*-?[[:space:]]*uses:[[:space:]]*[^[:space:]]+' .github/workflows \
| sed -E 's/.*uses:[[:space:]]*//' \
| grep -v '^\./' \
| grep -vE '@[0-9a-f]{40}$' \
| sort -u || true)

if [ -n "$unpinned" ]; then
echo "Third-party actions must be pinned to a full 40-character commit SHA."
echo "Unpinned references:"
echo "$unpinned" | sed 's/^/ /'
exit 1
fi

echo "All third-party action references are pinned to a full commit SHA."

test:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -27,10 +57,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Setup PHP
uses: shivammathur/setup-php@v2
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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
security-events: write

steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Audit workflows
uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2