Compare commits

...

11 Commits
3.12.5 ... 3

Author SHA1 Message Date
github-actions ed0f42a509 Merge branch '3.12' into 3 2024-03-23 12:28:32 +00:00
Michal Kleiner 031545737d
Merge pull request #750 from purplespider/fix-publish-profile-image-2 2024-03-20 23:00:47 +13:00
James Cocker 9fae326927 FIX Use $owns instead of onBeforeWrite hook to publish profile image 2024-03-20 22:54:38 +13:00
github-actions ca0624cc25 Merge branch '3.12' into 3 2024-02-10 12:28:11 +00:00
github-actions 3b6a519b39 Merge branch '3.12' into 3 2023-09-30 12:28:23 +00:00
github-actions eb108b8e83 Merge branch '3.12' into 3 2023-08-26 12:28:25 +00:00
Steve Boyd 941c2c7b11 Merge branch '3.12' into 3 2023-06-16 11:37:28 +12:00
Steve Boyd 84c93b1c2f Merge branch '3.12' into 3 2023-05-31 14:41:45 +12:00
Guy Sartorelli ba49047d94
Merge branch '3.12' into 3 2023-04-26 12:45:55 +12:00
Maxime Rainville 587379b8b3
Merge pull request #703 from creative-commoners/pulls/3/dispatch-ci
MNT Use gha-dispatch-ci
2023-03-23 12:16:37 +13:00
Steve Boyd 0b231cb2a5 MNT Use gha-dispatch-ci 2023-03-21 12:20:48 +13:00
3 changed files with 20 additions and 10 deletions

View File

@ -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

16
.github/workflows/dispatch-ci.yml vendored Normal file
View File

@ -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

View File

@ -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();
}
}
/**