Skip to content

Commit 6edc4da

Browse files
Merge branch 'main' of ssh://git.grey.ooo:222/Benzine/Github-Actions-Setup-PHP
2 parents ad2d6b5 + 2975382 commit 6edc4da

4 files changed

Lines changed: 64 additions & 13 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
echo "Composer is not available"
5050
exit 1
5151
fi
52-
# PHP Version is equal to 7.4
52+
# PHP Version is equal to 7.4
5353
if [ "$(php -r 'echo PHP_VERSION_ID;')" -gte 70400 && "$(php -r 'echo PHP_VERSION_ID;')" -lt 70500 ]; then
5454
echo "PHP Version is not 7.4. Got $(php -r 'echo PHP_VERSION_ID;') instead of between 70400-70500"
5555
exit 1
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Quality Control: Trunk Upgrade"
2+
3+
permissions: read-all
4+
5+
on:
6+
workflow_call:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .trunk/trunk.yaml
13+
- .github/workflows/trunk.upgrade.yml
14+
schedule:
15+
- cron: "0 11 * * 1" # 11am Tooling Monday
16+
17+
concurrency:
18+
group: ${{ github.head_ref || github.run_id }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
trunk-upgrade:
23+
name: Upgrade Trunk
24+
runs-on: ubuntu-latest
25+
permissions:
26+
contents: write # For trunk to create PRs
27+
pull-requests: write # For trunk to create PRs
28+
steps:
29+
- name: "Setup PHP"
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: 8.3
33+
- name: "Checkout"
34+
uses: actions/checkout@v4
35+
- name: "Trunk Upgrade"
36+
uses: trunk-io/trunk-action/upgrade@v1
37+
- name: "PR: Find Pull Request"
38+
uses: juliangruber/find-pull-request-action@v1
39+
id: find-pull-request
40+
with:
41+
labels: trunk
42+
- name: "PR: Enable Pull Request Automerge"
43+
continue-on-error: true
44+
uses: peter-evans/enable-pull-request-automerge@v3
45+
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
pull-request-number: ${{ steps.find-pull-request.outputs.number }}

.trunk/trunk.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
33
version: 0.1
44
cli:
5-
version: 1.22.1
5+
version: 1.22.2
66
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
77
plugins:
88
sources:
99
- id: trunk
10-
ref: v1.5.0
10+
ref: v1.6.1
1111
uri: https://github.com/trunk-io/plugins
1212
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
1313
runtimes:
@@ -16,15 +16,19 @@ runtimes:
1616
- python@3.10.8
1717
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
1818
lint:
19+
ignore:
20+
- linters: [markdownlint]
21+
paths:
22+
- LICENCE.md
1923
disabled:
2024
- git-diff-check
2125
enabled:
22-
- actionlint@1.7.0
23-
- checkov@3.2.95
24-
- markdownlint@0.40.0
25-
- prettier@3.2.5
26-
- trivy@0.51.1
27-
- trufflehog@3.76.3
26+
- actionlint@1.7.1
27+
- checkov@3.2.216
28+
- markdownlint@0.41.0
29+
- prettier@3.3.3
30+
- trivy@0.54.0
31+
- trufflehog@3.80.3
2832
- yamllint@1.35.1
2933
actions:
3034
enabled:
@@ -34,4 +38,4 @@ actions:
3438
- trunk-upgrade-available
3539
tools:
3640
enabled:
37-
- act@0.2.62
41+
- act@0.2.64

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ Sets up a PHP project with GitHub Actions, including detecting PHP version and r
55
![Tests Status](https://img.shields.io/github/actions/workflow/status/benzine-framework/action-setup-php/test.yml?logo=github&label=Tests)
66
![QC Status](https://img.shields.io/github/actions/workflow/status/benzine-framework/action-setup-php/trunk.check.yml?logo=github&label=QC)
77

8-
## Inputs:
8+
## Inputs
99

1010
- `working_directory`: The directory to run the PHP setup in. Default: `.`.
1111
- `php_tools`: The PHP tools to install.
1212

13-
## Outputs:
13+
## Outputs
1414

1515
- `php_version`: The PHP version that was detected.
1616

17-
## Exported Envs:
17+
## Exported Envs
1818

1919
- `PHP_VERSION`: The PHP version that was detected.

0 commit comments

Comments
 (0)