-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2aa655
commit df81281
Showing
8 changed files
with
145 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Composer | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "4.5.x" | ||
paths: | ||
- "composer.json" | ||
- ".github/workflows/composer-validate.yml" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
validate: | ||
name: Validate in PHP ${{ matrix.php-versions }} | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: ["7.4", "8.0", "8.1", "8.2"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mbstring, intl, json, mysqlnd, libcurl | ||
coverage: xdebug | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Validate composer.json | ||
run: composer validate --no-check-all | ||
- name: Install dependencies | ||
run: composer update --ansi --no-interaction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: PHPMD | ||
|
||
on: | ||
push: | ||
branches: ["4.5.x"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["4.5.x"] | ||
schedule: | ||
- cron: '27 4 * * 2' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@aa1fe473f9c687b6fb896056d771232c0bc41161 | ||
with: | ||
coverage: none | ||
tools: phpmd | ||
|
||
- name: Run PHPMD | ||
run: phpmd donjo-app sarif codesize,cleancode,naming,unusedcode --reportfile phpmd-results.sarif | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: phpmd-results.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: PULL_REQUEST | ||
|
||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
permissions: | ||
actions: write | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_URL: ${{ github.event.pull_request._links.html.href }} | ||
|
||
jobs: | ||
build: | ||
name: MERGE & LOCK | ||
runs-on: ubuntu-22.04 | ||
if: >- | ||
github.event.review.state == 'APPROVED' && | ||
github.event.review.user.id == 2387514 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get PR Title | ||
id: getTitle | ||
run: echo "title=$(gh pr view --json=title --jq '.title' $PR_URL)" >> $GITHUB_OUTPUT | ||
|
||
- name: Squash & Merge | ||
uses: "pascalgn/[email protected]" | ||
id: squashmerge | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MERGE_METHOD: "squash" | ||
MERGE_LABELS: "dependencies" | ||
MERGE_COMMIT_MESSAGE: "(#{pullRequest.number}) ${{ steps.getTitle.outputs.title }}" | ||
|
||
- if: steps.squashmerge.outputs.mergeResult == 'merged' | ||
name: lock PR | ||
run: gh pr lock ${{ steps.squashmerge.outputs.pullRequestNumber }} -r "resolved" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters