Skip to content

Commit d5fe457

Browse files
Merge pull request #130 from creative-commoners/pulls/3.1/module-standardiser-1743719318
MNT Run module-standardiser
2 parents 3813576 + 7737c8d commit d5fe457

8 files changed

Lines changed: 76 additions & 7 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Add new PRs to github project
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- ready_for_review
8+
9+
permissions: {}
10+
11+
jobs:
12+
addprtoproject:
13+
name: Add PR to GitHub Project
14+
# Only run on the silverstripe account
15+
if: github.repository_owner == 'silverstripe'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Add PR to github project
19+
uses: silverstripe/gha-add-pr-to-project@v1
20+
with:
21+
app_id: ${{ vars.PROJECT_PERMISSIONS_APP_ID }}
22+
private_key: ${{ secrets.PROJECT_PERMISSIONS_APP_PRIVATE_KEY }}

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ on:
88
jobs:
99
ci:
1010
name: CI
11+
# Do not run if this is a pull-request from same repo i.e. not a fork repo
12+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
1113
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1

.github/workflows/dispatch-ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
name: Dispatch CI
22

33
on:
4-
# At 12:10 PM UTC, only on Saturday and Sunday
4+
# At 1:05 AM UTC, only on Monday and Tuesday
55
schedule:
6-
- cron: '10 12 * * 6,0'
6+
- cron: '5 1 * * 1,2'
7+
8+
permissions: {}
79

810
jobs:
911
dispatch-ci:
1012
name: Dispatch CI
1113
# Only run cron on the silverstripe account
1214
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
1315
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
actions: write
1419
steps:
1520
- name: Dispatch CI
1621
uses: silverstripe/gha-dispatch-ci@v1

.github/workflows/keepalive.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
name: Keepalive
22

33
on:
4-
# At 2:10 AM UTC, on day 3 of the month
4+
# At 10:50 PM UTC, on day 23 of the month
55
schedule:
6-
- cron: '10 2 3 * *'
6+
- cron: '50 22 23 * *'
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
keepalive:
1113
name: Keepalive
1214
# Only run cron on the silverstripe account
1315
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
1416
runs-on: ubuntu-latest
17+
permissions:
18+
actions: write
1519
steps:
1620
- name: Keepalive
1721
uses: silverstripe/gha-keepalive@v1

.github/workflows/merge-up.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: Merge-up
22

33
on:
4-
# At 12:10 PM UTC, only on Wednesday
4+
# At 1:05 AM UTC, only on Friday
55
schedule:
6-
- cron: '10 12 * * 3'
6+
- cron: '5 1 * * 5'
77
workflow_dispatch:
88

9+
permissions: {}
10+
911
jobs:
1012
merge-up:
1113
name: Merge-up
1214
# Only run cron on the silverstripe account
1315
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
1416
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
actions: write
1520
steps:
1621
- name: Merge-up
1722
uses: silverstripe/gha-merge-up@v1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Tag patch release
2+
3+
on:
4+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
5+
workflow_dispatch:
6+
inputs:
7+
latest_local_sha:
8+
description: The latest local sha
9+
required: true
10+
type: string
11+
12+
permissions: {}
13+
14+
jobs:
15+
tagpatchrelease:
16+
name: Tag patch release
17+
# Only run cron on the silverstripe account
18+
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
steps:
23+
- name: Tag release
24+
uses: silverstripe/gha-tag-release@v2
25+
with:
26+
latest_local_sha: ${{ inputs.latest_local_sha }}

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
},
2121
"require-dev": {
2222
"phpunit/phpunit": "^9.6",
23-
"squizlabs/php_codesniffer": "^3"
23+
"squizlabs/php_codesniffer": "^3",
24+
"silverstripe/standards": "^1",
25+
"phpstan/extension-installer": "^1.3"
2426
},
2527
"suggest": {
2628
"symbiote/silverstripe-gridfieldextensions": "Allows sorting of TaxonomyTerm objects via drag-and-drop",

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
parameters:
2+
paths:
3+
- src

0 commit comments

Comments
 (0)