Compare commits
11 Commits
Author | SHA1 | Date |
---|---|---|
github-actions | ed0f42a509 | |
Michal Kleiner | 031545737d | |
James Cocker | 9fae326927 | |
github-actions | ca0624cc25 | |
github-actions | 3b6a519b39 | |
github-actions | eb108b8e83 | |
Steve Boyd | 941c2c7b11 | |
Steve Boyd | 84c93b1c2f | |
Guy Sartorelli | ba49047d94 | |
Maxime Rainville | 587379b8b3 | |
Steve Boyd | 0b231cb2a5 |
|
@ -4,13 +4,8 @@ on:
|
|||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
# Every Tuesday at 12:20pm UTC
|
||||
schedule:
|
||||
- cron: '20 12 * * 2'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
name: Dispatch CI
|
||||
|
||||
on:
|
||||
# At 12:20 PM UTC, only on Tuesday and Wednesday
|
||||
schedule:
|
||||
- cron: '20 12 * * 2,3'
|
||||
|
||||
jobs:
|
||||
dispatch-ci:
|
||||
name: Dispatch CI
|
||||
# Only run cron on the silverstripe account
|
||||
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dispatch CI
|
||||
uses: silverstripe/gha-dispatch-ci@v1
|
|
@ -35,6 +35,10 @@ class BlogMemberExtension extends DataExtension
|
|||
'BlogProfileImage' => Image::class
|
||||
];
|
||||
|
||||
private static array $owns = [
|
||||
'BlogProfileImage',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -59,11 +63,6 @@ class BlogMemberExtension extends DataExtension
|
|||
$this->owner->URLSegment = preg_replace('/-[0-9]+$/', '', $this->owner->URLSegment ?? '') . '-' . $count;
|
||||
$count++;
|
||||
}
|
||||
|
||||
// Auto publish profile images
|
||||
if ($this->owner->BlogProfileImage() && $this->owner->BlogProfileImage()->exists()) {
|
||||
$this->owner->BlogProfileImage()->publishSingle();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue