Skip to content

Commit 03ef3a4

Browse files
authored
Merge pull request #237 from wayofdev/feat/updates
2 parents 7489cdf + 25271bb commit 03ef3a4

12 files changed

+803
-83
lines changed

.github/workflows/apply-labels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ name: 🏷️ Add labels
1414

1515
jobs:
1616
label:
17-
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
17+
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@v3.1.1
1818
with:
1919
os: ubuntu-latest
2020
secrets:

.github/workflows/auto-merge-release.yaml renamed to .github/workflows/auto-merge-release.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
on: # yamllint disable-line rule:truthy
66
pull_request:
7+
branches:
8+
- master
79

810
permissions:
911
pull-requests: write
@@ -13,7 +15,7 @@ name: 🤞 Auto merge release
1315

1416
jobs:
1517
auto-merge:
16-
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@master
18+
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@v3.1.1
1719
with:
1820
os: ubuntu-latest
1921
pull-request-number: ${{ github.event.pull_request.number }}

.github/workflows/ci.yml

-72
This file was deleted.
+200
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
branches:
6+
- master
7+
8+
name: 🧹 Fix PHP coding standards
9+
10+
jobs:
11+
commit-linting:
12+
timeout-minutes: 4
13+
runs-on: ubuntu-latest
14+
concurrency:
15+
cancel-in-progress: true
16+
group: commit-linting-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
permissions:
18+
contents: read
19+
pull-requests: read
20+
steps:
21+
- name: 📦 Check out the codebase
22+
uses: actions/[email protected]
23+
24+
- name: 🧐 Lint commits using "commitlint"
25+
uses: wagoid/[email protected]
26+
with:
27+
configFile: ${{ github.workspace }}/.github/.commitlint.config.mjs
28+
failOnWarnings: false
29+
failOnErrors: true
30+
helpURL: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
31+
32+
yaml-linting:
33+
timeout-minutes: 4
34+
runs-on: ubuntu-latest
35+
concurrency:
36+
cancel-in-progress: true
37+
group: yaml-linting-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
38+
permissions:
39+
contents: read
40+
pull-requests: read
41+
steps:
42+
- name: 📦 Check out the codebase
43+
uses: actions/[email protected]
44+
45+
- name: 🧐 Lint YAML files
46+
uses: ibiqlik/[email protected]
47+
with:
48+
config_file: .github/.yamllint.yaml
49+
file_or_dir: '.'
50+
strict: true
51+
52+
markdown-linting:
53+
timeout-minutes: 4
54+
runs-on: ubuntu-latest
55+
concurrency:
56+
cancel-in-progress: true
57+
group: markdown-linting-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
58+
steps:
59+
- name: 📦 Check out the codebase
60+
uses: actions/[email protected]
61+
62+
- name: 🧐 Lint Markdown files
63+
uses: DavidAnson/[email protected]
64+
with:
65+
config: '.github/.markdownlint.json'
66+
globs: |
67+
**/*.md
68+
!CHANGELOG.md
69+
70+
composer-linting:
71+
timeout-minutes: 4
72+
runs-on: ${{ matrix.os }}
73+
concurrency:
74+
cancel-in-progress: true
75+
group: composer-linting-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
76+
strategy:
77+
matrix:
78+
os:
79+
- ubuntu-latest
80+
php-version:
81+
- '8.2'
82+
dependencies:
83+
- locked
84+
permissions:
85+
contents: write
86+
steps:
87+
- name: 🛠️ Setup PHP
88+
uses: shivammathur/[email protected]
89+
with:
90+
php-version: ${{ matrix.php-version }}
91+
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, phar, fileinfo, curl
92+
ini-values: error_reporting=E_ALL
93+
coverage: none
94+
tools: phive
95+
96+
- name: 📦 Check out the codebase
97+
uses: actions/[email protected]
98+
99+
- name: 🛠️ Setup problem matchers
100+
run: |
101+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
102+
103+
- name: 🤖 Validate composer.json and composer.lock
104+
run: composer validate --ansi --strict
105+
106+
- name: 🔍 Get composer cache directory
107+
uses: wayofdev/gh-actions/actions/composer/[email protected]
108+
109+
- name: ♻️ Restore cached dependencies installed with composer
110+
uses: actions/[email protected]
111+
with:
112+
path: ${{ env.COMPOSER_CACHE_DIR }}
113+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
114+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
115+
116+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
117+
uses: wayofdev/gh-actions/actions/composer/[email protected]
118+
with:
119+
dependencies: ${{ matrix.dependencies }}
120+
121+
- name: 📥 Install dependencies with phive
122+
uses: wayofdev/gh-actions/actions/phive/[email protected]
123+
with:
124+
phive-home: '.phive'
125+
trust-gpg-keys: 0xC00543248C87FB13,0x033E5F8D801A2F8D
126+
127+
- name: 🔍 Run ergebnis/composer-normalize
128+
run: .phive/composer-normalize --ansi --dry-run
129+
130+
coding-standards:
131+
timeout-minutes: 4
132+
runs-on: ${{ matrix.os }}
133+
concurrency:
134+
cancel-in-progress: true
135+
group: coding-standards-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
136+
strategy:
137+
matrix:
138+
os:
139+
- ubuntu-latest
140+
php-version:
141+
- '8.2'
142+
dependencies:
143+
- locked
144+
permissions:
145+
contents: write
146+
steps:
147+
- name: ⚙️ Set git to use LF line endings
148+
run: |
149+
git config --global core.autocrlf false
150+
git config --global core.eol lf
151+
152+
- name: 🛠️ Setup PHP
153+
uses: shivammathur/[email protected]
154+
with:
155+
php-version: ${{ matrix.php-version }}
156+
extensions: none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, curl
157+
ini-values: error_reporting=E_ALL
158+
coverage: none
159+
160+
- name: 📦 Check out the codebase
161+
uses: actions/[email protected]
162+
163+
- name: 🛠️ Setup problem matchers
164+
run: |
165+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
166+
167+
- name: 🤖 Validate composer.json and composer.lock
168+
run: composer validate --ansi --strict
169+
170+
- name: 🔍 Get composer cache directory
171+
uses: wayofdev/gh-actions/actions/composer/[email protected]
172+
173+
- name: ♻️ Restore cached dependencies installed with composer
174+
uses: actions/[email protected]
175+
with:
176+
path: ${{ env.COMPOSER_CACHE_DIR }}
177+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
178+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
179+
180+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies with composer
181+
uses: wayofdev/gh-actions/actions/composer/[email protected]
182+
with:
183+
dependencies: ${{ matrix.dependencies }}
184+
185+
- name: 🛠️ Prepare environment
186+
run: make prepare
187+
188+
- name: 🚨 Run coding standards task
189+
run: composer cs:fix
190+
env:
191+
PHP_CS_FIXER_IGNORE_ENV: true
192+
193+
- name: 📤 Commit and push changed files back to GitHub
194+
uses: stefanzweifel/[email protected]
195+
with:
196+
commit_message: 'style(php-cs-fixer): lint php files and fix coding standards'
197+
branch: ${{ github.head_ref }}
198+
commit_author: 'github-actions <[email protected]>'
199+
env:
200+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/create-arch-diagram.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ permissions: read-all
1919

2020
jobs:
2121
codesee:
22-
uses: wayofdev/gh-actions/.github/workflows/create-arch-diagram.yml@master
22+
uses: wayofdev/gh-actions/.github/workflows/create-arch-diagram.yml@v3.1.1
2323
with:
2424
os: ubuntu-latest
2525
continue-on-error: true

.github/workflows/create-release.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
44
# https://github.com/google-github-actions/release-please-action#release-types-supported
5+
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md
56

67
on: # yamllint disable-line rule:truthy
78
push:
@@ -12,12 +13,15 @@ name: 📦 Create release
1213

1314
jobs:
1415
release:
15-
uses: wayofdev/gh-actions/.github/workflows/create-release.yml@master
16-
with:
17-
os: ubuntu-latest
18-
branch: master
19-
package-name: laravel-paginator
20-
secrets:
21-
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 🎉 Create release
19+
uses: googleapis/[email protected]
20+
id: release
21+
with:
22+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
23+
config-file: .github/.release-please-config.json
24+
manifest-file: .github/.release-please-manifest.json
25+
target-branch: master
2226

2327
...

0 commit comments

Comments
 (0)