Skip to content

Commit 48fc503

Browse files
authored
Merge pull request #159 from wayofdev/feat/reusable-workflows
2 parents d5bdefb + e7def88 commit 48fc503

9 files changed

+67
-92
lines changed

.github/workflows/label.yml renamed to .github/workflows/apply-labels.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@
44
# paths that are modified in the pull request.
55
#
66
# To use this workflow, you will need to set up a .github/labeler.yml
7-
# file with configuration. For more information, see:
7+
# file with configuration. For more information, see:
88
# https://github.com/actions/labeler/blob/master/README.md
99

1010
on: # yamllint disable-line rule:truthy
1111
pull_request:
1212

13-
name: 🏷️ Apply labels
13+
name: 🏷️ Add labels
1414

1515
jobs:
1616
label:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: 🏷️ Apply labels
20-
uses: actions/labeler@v4
21-
with:
22-
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
18+
with:
19+
os: ubuntu-latest
20+
secrets:
21+
token: ${{ secrets.GITHUB_TOKEN }}
2322

2423
...

.github/workflows/auto-merge-release.yaml

+9-10
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ name: 🤞 Auto merge release
1313

1414
jobs:
1515
auto-merge:
16-
if: github.actor == 'lotyp' && startsWith(github.head_ref, 'release-please--')
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: 🤞 Auto-merge pull request
20-
uses: peter-evans/enable-pull-request-automerge@v3
21-
with:
22-
pull-request-number: ${{ github.event.pull_request.number }}
23-
merge-method: merge
24-
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
25-
token: ${{ secrets.GITHUB_TOKEN }}
16+
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@master
17+
with:
18+
os: ubuntu-latest
19+
pull-request-number: ${{ github.event.pull_request.number }}
20+
actor: lotyp
21+
merge-method: merge
22+
secrets:
23+
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
24+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
2625

2726
...

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
XDEBUG_MODE: coverage
5353
run: vendor/bin/phpunit --coverage-clover=coverage.xml
5454

55-
# - name: 📝 Run static analysis using phpstan
56-
# run: make stan
55+
- name: 📝 Run static analysis using phpstan
56+
run: make stan
5757

5858
- name: 📤 Upload coverage report to Codecov
5959
uses: codecov/codecov-action@v3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2+
23
# This workflow was added by CodeSee. Learn more at https://codesee.io/
34
# This is v2.0 of this workflow file
45

5-
on: # yamllint disable-line rule:truthy
6+
on: # yamllint disable-line rule:truthy
67
push:
78
branches:
8-
- master
99
- develop
1010
pull_request_target:
1111
types:
@@ -19,10 +19,11 @@ permissions: read-all
1919

2020
jobs:
2121
codesee:
22-
runs-on: ubuntu-latest
23-
continue-on-error: true
24-
steps:
25-
- name: 💻 Analyze the repo with CodeSee
26-
uses: Codesee-io/codesee-action@v2
27-
with:
28-
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
22+
uses: wayofdev/gh-actions/.github/workflows/create-arch-diagram.yml@master
23+
with:
24+
os: ubuntu-latest
25+
continue-on-error: true
26+
secrets:
27+
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
28+
29+
...

.github/workflows/create-release.yml

+9-26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22

3+
# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
34
# https://github.com/google-github-actions/release-please-action#release-types-supported
45

56
on: # yamllint disable-line rule:truthy
@@ -10,31 +11,13 @@ on: # yamllint disable-line rule:truthy
1011
name: 📦 Create release
1112

1213
jobs:
13-
create-release:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: 🎉 Create release
17-
uses: google-github-actions/release-please-action@v3
18-
id: release
19-
with:
20-
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
21-
release-type: node
22-
package-name: laravel-cycle-orm-adapter
23-
default-branch: master
24-
changelog-types: |
25-
[
26-
{ "type": "feat", "section": "Features", "hidden": false },
27-
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
28-
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
29-
{ "type": "docs", "section": "Documentation", "hidden": false },
30-
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
31-
{ "type": "style", "section": "Styles", "hidden": true },
32-
{ "type": "revert", "section": "Reverts", "hidden": true },
33-
{ "type": "deps", "section": "Dependencies", "hidden": true },
34-
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
35-
{ "type": "test", "section": "Tests", "hidden": true },
36-
{ "type": "build", "section": "Build System", "hidden": true },
37-
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
38-
]
14+
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-cycle-orm-adapter
20+
secrets:
21+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
3922

4023
...

.github/workflows/shellcheck.yml

+6-13
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,11 @@ permissions:
1010

1111
jobs:
1212
shellcheck:
13-
runs-on: ubuntu-latest
14-
15-
steps:
16-
- name: 📦 Check out the codebase
17-
uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 0
20-
21-
- name: 🐞 Differential shell-check
22-
uses: redhat-plumbers-in-action/differential-shellcheck@v4
23-
with:
24-
severity: warning
25-
token: ${{ secrets.GITHUB_TOKEN }}
13+
uses: wayofdev/gh-actions/.github/workflows/shellcheck.yml@master
14+
with:
15+
os: ubuntu-latest
16+
severity: warning
17+
secrets:
18+
token: ${{ secrets.GITHUB_TOKEN }}
2619

2720
...

composer.lock

+23-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan.neon.dist

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ parameters:
55
level: 5
66
paths:
77
- config/
8-
- database/
98
- src/
109
- tests/
1110

src/Bridge/Laravel/Providers/CycleServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function boot(): void
1616
if ($this->app->runningInConsole()) {
1717
$this->publishes([
1818
__DIR__ . '/../../../../config/cycle.php' => config_path('cycle.php'),
19-
]);
19+
], 'config');
2020

2121
$this->registerConsoleCommands();
2222
}

0 commit comments

Comments
 (0)