Skip to content

Commit 3f73062

Browse files
authored
Merge pull request #6 from reactphp-parallel/add-github-config
Add GitHub Configuration
2 parents aabe7af + 0eac896 commit 3f73062

File tree

9 files changed

+390
-21
lines changed

9 files changed

+390
-21
lines changed

.dependabot/config.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @WyriHaximus

.github/boring-cyborg.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
labelPRBasedOnFilePath:
2+
"Documentation 📚":
3+
- README.md
4+
- CONTRIBUTING.md
5+
"Dependencies 📦":
6+
- Dockerfile*
7+
- composer.*
8+
- package.json
9+
- package-lock.json
10+
- yarn.lock
11+
"Docker 🐳":
12+
- Dockerfile*
13+
- .docker/**/*
14+
"Image 🖼":
15+
- "**/*.gif"
16+
- "**/*.jpg"
17+
- "**/*.jpeg"
18+
- "**/*.png"
19+
- "**/*.webp"
20+
"CSS 👩‍🎨":
21+
- "**/*.css"
22+
"HTML 👷‍♀️":
23+
- "**/*.htm"
24+
- "**/*.html"
25+
"NEON 🦹‍♂️":
26+
- "**/*.neon"
27+
"MarkDown 📝":
28+
- "**/*.md"
29+
"YAML 🍄":
30+
- "**/*.yml"
31+
- "**/*.yaml"
32+
"JSON 👨‍💼":
33+
- "**/*.json"
34+
"Go 🐹":
35+
- "**/*.go"
36+
"JavaScript 🦏":
37+
- "**/*.js"
38+
- package.json
39+
- package-lock.json
40+
- yarn.lock
41+
"PHP 🐘":
42+
- "**/*.php"
43+
- composer.*
44+
"Configuration ⚙":
45+
- .github/*
46+
"CI 🚧":
47+
- .github/workflows/*
48+
- .scrutinizer.yml
49+
"Templates 🌲":
50+
- "**/*.twig"
51+
- "**/*.tpl"
52+
"Helm ☸":
53+
- .helm/**/*
54+
"Tests 🧪":
55+
- tests/**/*
56+
"Source 🔮":
57+
- src/**/*
58+
59+
labelerFlags:
60+
labelOnPRUpdates: true

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
labels:
8+
- "Dependencies 📦"
9+
- "PHP 🐘"
10+
versioning-strategy: "increase"
11+
open-pull-requests-limit: 1

.github/settings.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
repository:
2+
private: false
3+
has_issues: true
4+
has_wiki: false
5+
has_downloads: true
6+
default_branch: master
7+
allow_squash_merge: false
8+
allow_merge_commit: true
9+
allow_rebase_merge: false
10+
11+
# Labels: define labels for Issues and Pull Requests
12+
labels:
13+
- name: "Dependencies 📦"
14+
color: 0025ff
15+
description: "Pull requests that update a dependency file"
16+
- name: "Image 🖼"
17+
color: 00ffff
18+
- name: "HTML 👷‍♀️"
19+
color: ffffff
20+
- name: "CSS 👩‍🎨"
21+
color: b3b3b3
22+
- name: "JavaScript 🦏"
23+
color: ffff00
24+
- name: "Go 🐹"
25+
color: 00ADD8
26+
- name: "JSON 👨‍💼"
27+
color: 00ADD8
28+
- name: "NEON 🦹‍♂️"
29+
color: CE3262
30+
- name: "MarkDown 📝"
31+
color: 000000
32+
- name: "YAML 🍄"
33+
color: ff1aff
34+
- name: "Templates 🌲"
35+
color: 009933
36+
- name: "Helm ☸"
37+
color: 091C84
38+
- name: "Tests 🧪"
39+
color: ffe6e6
40+
- name: "Source 🔮"
41+
color: e6ffe6
42+
- name: "Configuration ⚙"
43+
color: b3b3cc
44+
- name: "PHP 🐘"
45+
color: 8892BF
46+
description: "Hypertext Pre Processor"
47+
- name: "Docker 🐳"
48+
color: 0db7ed
49+
description: "Pull requests that relate to Docker"
50+
- name: "CI 🚧"
51+
color: ffff00
52+
- name: "Feature 🏗"
53+
color: 66ff99
54+
- name: "Documentation 📚"
55+
color: 6666ff
56+
- name: "Security 🕵️‍♀️"
57+
color: ff0000
58+
- name: "Hacktoberfest 🎃"
59+
color: 152347
60+
- name: "Bug 🐞"
61+
color: d73a4a
62+
description: "Something isn't working"
63+
oldname: bug
64+
- name: "Duplicate ♊"
65+
color: cfd3d7
66+
description: "This issue or pull request already exists"
67+
oldname: duplicate
68+
- name: "Enhancement ✨"
69+
color: a2eeef
70+
description: "New feature or request"
71+
oldname: enhancement
72+
- name: "Good First Issue"
73+
color: 7057ff
74+
description: "Good for newcomers"
75+
oldname: "good first issue"
76+
- name: "Help Wanted"
77+
color: 008672
78+
description: "Extra attention is needed"
79+
oldname: "help wanted"
80+
- name: Invalid
81+
color: e4e669
82+
description: "This doesn't seem right"
83+
oldname: invalid
84+
- name: "Question ❓"
85+
color: d876e3
86+
description: "Further information is requested"
87+
oldname: question
88+
- name: "Will not be fixed 🛑"
89+
color: ffffff
90+
description: "This will not be worked on"
91+
oldname: wontfix
92+
- name: "Sponsor Request ❤️"
93+
color: fedbf0
94+
description: "Issue/PR opened by sponsor"
95+
96+
branches:
97+
- name: master
98+
protection:
99+
required_pull_request_reviews:
100+
required_approving_review_count: 1
101+
dismiss_stale_reviews: true
102+
require_code_owner_reviews: true
103+
# Required. Require status checks to pass before merging. Set to null to disable
104+
required_status_checks:
105+
# Required. Require branches to be up to date before merging.
106+
strict: true
107+
# Required. The list of status checks to require in order to merge into this branch
108+
contexts: []
109+
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
110+
enforce_admins: true
111+
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
112+
restrictions:
113+
apps: []
114+
users: []
115+
teams: []

.github/workflows/ci.yml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,33 @@ on:
33
push:
44
pull_request:
55
jobs:
6+
generate-checks-strategy:
7+
name: Generate Checks
8+
runs-on: ubuntu-latest
9+
outputs:
10+
check: ${{ steps.generate-checks-strategy.outputs.check }}
11+
steps:
12+
- uses: actions/checkout@v1
13+
- id: generate-checks-strategy
14+
name: Generate check
15+
run: |
16+
printf "Checks found: %s\r\n" $(make task-list-ci)
17+
printf "::set-output name=check::%s" $(make task-list-ci)
18+
lint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Lint Code Base
22+
uses: docker://github/super-linter:v2.2.0
623
composer-install:
724
strategy:
25+
fail-fast: false
826
matrix:
927
php: [7.4]
1028
composer: [lowest, current, highest]
29+
needs: lint
1130
runs-on: ubuntu-latest
1231
container:
13-
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
32+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
1433
steps:
1534
- uses: actions/checkout@v1
1635
- name: Cache composer packages
@@ -19,29 +38,47 @@ jobs:
1938
path: ./vendor/
2039
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2140
- name: Install Dependencies
22-
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist
41+
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
2342
if: matrix.composer == 'lowest'
2443
- name: Install Dependencies
25-
run: composer install --ansi --no-progress --no-interaction --prefer-dist
44+
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
2645
if: matrix.composer == 'current'
2746
- name: Install Dependencies
28-
run: composer update --ansi --no-progress --no-interaction --prefer-dist
47+
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
2948
if: matrix.composer == 'highest'
3049
qa:
3150
strategy:
51+
fail-fast: false
3252
matrix:
3353
php: [7.4]
3454
composer: [lowest, current, highest]
35-
qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused]
36-
needs: composer-install
55+
check: ${{ fromJson(needs.generate-checks-strategy.outputs.check) }}
56+
needs:
57+
- composer-install
58+
- generate-checks-strategy
3759
runs-on: ubuntu-latest
3860
container:
39-
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
61+
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
4062
steps:
4163
- uses: actions/checkout@v1
4264
- name: Cache composer packages
4365
uses: actions/cache@v1
4466
with:
4567
path: ./vendor/
4668
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
47-
- run: make ${{ matrix.qa }}
69+
- name: Install Dependencies
70+
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
71+
if: matrix.composer == 'lowest'
72+
- name: Install Dependencies
73+
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
74+
if: matrix.composer == 'current'
75+
- name: Install Dependencies
76+
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
77+
if: matrix.composer == 'highest'
78+
- name: Fetch Tags
79+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
80+
if: matrix.check == 'backward-compatibility-check'
81+
- run: make ${{ matrix.check }}
82+
env:
83+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
84+
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}

.github/workflows/craft-release.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Create Release
2+
env:
3+
MILESTONE: ${{ github.event.milestone.title }}
4+
on:
5+
milestone:
6+
types:
7+
- closed
8+
jobs:
9+
wait-for-status-checks:
10+
name: Wait for status checks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- run: sleep 13
15+
- name: 'Wait for status checks'
16+
id: waitforstatuschecks
17+
uses: "WyriHaximus/github-action-wait-for-status@master"
18+
with:
19+
ignoreActions: "Wait for status checks"
20+
checkInterval: 5
21+
env:
22+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
23+
- id: generate-version-strategy
24+
if: steps.waitforstatuschecks.outputs.status != 'success'
25+
name: Fail
26+
run: exit 1
27+
generate-changelog:
28+
name: Generate Changelog
29+
needs:
30+
- wait-for-status-checks
31+
runs-on: ubuntu-latest
32+
outputs:
33+
changelog: ${{ steps.changelog.outputs.changelog }}
34+
steps:
35+
- name: Generate changelog
36+
uses: WyriHaximus/github-action-jwage-changelog-generator@v1
37+
id: changelog
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
milestone: ${{ env.MILESTONE }}
42+
- name: Show changelog
43+
run: echo "${CHANGELOG}"
44+
env:
45+
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
46+
create-release:
47+
name: Create Release
48+
needs:
49+
- generate-changelog
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v1
53+
env:
54+
CHANGELOG: ${{ needs.generate-changelog.outputs.changelog }}
55+
- run: |
56+
echo -e "${MILESTONE_DESCRIPTION}\r\n\r\n${CHANGELOG}" > release-${{ env.MILESTONE }}-release-message.md
57+
cat release-${{ env.MILESTONE }}-release-message.md
58+
release_message=$(cat release-${{ env.MILESTONE }}-release-message.md)
59+
release_message="${release_message//'%'/'%25'}"
60+
release_message="${release_message//$'\n'/'%0A'}"
61+
release_message="${release_message//$'\r'/'%0D'}"
62+
echo "::set-output name=release_message::$release_message"
63+
id: releasemessage
64+
env:
65+
MILESTONE_DESCRIPTION: ${{ github.event.milestone.description }}
66+
CHANGELOG: ${{ needs.generate-changelog.outputs.changelog }}
67+
- name: Create Reference Release with Changelog
68+
uses: fleskesvor/create-release@feature/support-target-commitish
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
tag_name: ${{ env.MILESTONE }}
73+
release_name: ${{ env.MILESTONE }}
74+
body: ${{ steps.releasemessage.outputs.release_message }}
75+
draft: false
76+
prerelease: false

.github/workflows/label-sponsors.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Label sponsors ❤️
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
issues:
7+
types:
8+
- opened
9+
jobs:
10+
sponsor-label:
11+
name: Label sponsors ❤️
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: JasonEtco/is-sponsor-label-action@v1
15+
with:
16+
label: Sponsor Request ❤️
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)