Skip to content

Commit c68c276

Browse files
committed
update github actions
1 parent e189f20 commit c68c276

File tree

4 files changed

+47
-46
lines changed

4 files changed

+47
-46
lines changed

.github/workflows/codestyle.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,29 @@ on:
55
branches:
66
- main
77
paths:
8-
- '**.php'
9-
- '**.ts'
10-
- '**.scss'
8+
- "**.php"
119
pull_request:
1210
paths:
13-
- '**.php'
14-
- '**.ts'
15-
- '**.scss'
11+
- "**.php"
12+
13+
permissions:
14+
contents: read
1615

1716
jobs:
1817
php:
1918
name: PHP
2019
runs-on: self-hosted
2120
steps:
22-
- uses: actions/checkout@v4
23-
- name: Setup PHP with tools
24-
uses: shivammathur/setup-php@v2
25-
with:
26-
php-version: '8.3'
27-
extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
28-
tools: cs2pr, phpcs, php-cs-fixer
29-
- name: phpcs
30-
run: phpcs -n -q --report=checkstyle | cs2pr
31-
- name: php-cs-fixer
32-
run: php-cs-fixer fix --dry-run --diff
21+
- uses: actions/checkout@v4
22+
- name: Setup PHP with tools
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: "8.1"
26+
extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
27+
tools: cs2pr, phpcs, php-cs-fixer
28+
- name: phpcs
29+
run: |
30+
sudo update-alternatives --set php /usr/bin/php8.1
31+
phpcs -n -q --report=checkstyle | cs2pr
32+
- name: php-cs-fixer
33+
run: php-cs-fixer fix --dry-run --diff

.github/workflows/php.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ on:
55
branches:
66
- main
77
tags-ignore:
8-
- '**'
8+
- "**"
99
paths:
10-
- '**.php'
10+
- "**.php"
1111
pull_request:
1212
paths:
13-
- '**.php'
13+
- "**.php"
14+
15+
permissions:
16+
contents: read
1417

1518
jobs:
1619
syntax:
@@ -20,18 +23,15 @@ jobs:
2023
fail-fast: false
2124
matrix:
2225
php:
23-
- '8.1'
24-
- '8.2'
25-
- '8.3'
26+
- "8.1"
27+
- "8.2"
28+
- "8.3"
2629
steps:
27-
- uses: actions/checkout@v4
28-
- name: Set up PHP
29-
uses: shivammathur/setup-php@v2
30-
with:
31-
php-version: ${{ matrix.php }}
32-
- run: echo "::add-matcher::.github/php-syntax.json"
33-
- name: Remove files to be ignored
34-
run: |
35-
true
36-
- run: |
37-
! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'
30+
- name: Set up PHP
31+
uses: shivammathur/setup-php@v2
32+
with:
33+
php-version: ${{ matrix.php }}
34+
- uses: actions/checkout@v4
35+
- run: echo "::add-matcher::.github/php-syntax.json"
36+
- run: |
37+
! find . -type f -name '*.php' -exec php -l '{}' \; 2>&1 |grep -v '^No syntax errors detected'

.github/workflows/pull_request.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ jobs:
1616
runs-on: self-hosted
1717
steps:
1818
- name: Check for GitHub's default message.
19-
uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77
19+
uses: gsactions/commit-message-checker@v2
2020
with:
2121
pattern: '^(?!Update\s+\S*$).*$'
22-
error: 'Please use a meaningful commit message.'
23-
excludeDescription: 'true'
24-
excludeTitle: 'true'
25-
checkAllCommitMessages: 'true'
22+
error: "Please use a meaningful commit message."
23+
excludeDescription: "true"
24+
excludeTitle: "true"
25+
checkAllCommitMessages: "true"
2626
accessToken: ${{ secrets.GITHUB_TOKEN }}
2727
- name: Check for unsquashed `fixup!` commits.
2828
if: ${{ ! github.event.pull_request.draft }}
29-
uses: gsactions/commit-message-checker@c61c81192182bbc0d5e41b4796e3b71684228c77
29+
uses: gsactions/commit-message-checker@v2
3030
with:
3131
pattern: '^(?!fixup!(\s|$))'
32-
error: 'A `fixup!` commit was found.'
33-
excludeDescription: 'true'
34-
excludeTitle: 'true'
35-
checkAllCommitMessages: 'true'
32+
error: "A `fixup!` commit was found."
33+
excludeDescription: "true"
34+
excludeTitle: "true"
35+
checkAllCommitMessages: "true"
3636
accessToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: "16"
17+
node-version: "20"
1818
- name: Create package
1919
run: |
2020
rm -rf *.tar.gz
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
echo "Packaging FAILED" && exit 1
3131
- name: Release
32-
uses: softprops/action-gh-release@v2
32+
uses: softprops/action-gh-release@v1
3333
if: startsWith(github.ref, 'refs/tags/') && steps.check_files.outputs.files_exists == 'true'
3434
with:
3535
files: "*.tar.gz"

0 commit comments

Comments
 (0)