Skip to content

Commit

Permalink
Merge pull request #1159 from shikorism/develop
Browse files Browse the repository at this point in the history
Release 2024.1.1
  • Loading branch information
shibafu528 authored Jan 13, 2024
2 parents d684ce9 + bb975f8 commit 4c5bac5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ on:
- develop
tags:
- '**'
pull_request:
workflow_dispatch:
inputs:
pull_request_number:
description: 'Pull request number'
type: number
required: true

jobs:
build:
Expand All @@ -18,7 +23,15 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v4
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
ref: refs/pull/${{ inputs.pull_request_number }}/merge

- name: Checkout
uses: actions/checkout@v4
if: ${{ github.event_name != 'workflow_dispatch' }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -35,8 +48,8 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}-foundation
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,enable=${{ github.event_name != 'workflow_dispatch' }},event=branch
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},value=pr-${{ inputs.pull_request_number }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand All @@ -55,8 +68,8 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}-nginx
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,enable=${{ github.event_name != 'workflow_dispatch' }},event=branch
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},value=pr-${{ inputs.pull_request_number }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand All @@ -77,8 +90,8 @@ jobs:
with:
images: ghcr.io/${{ github.repository }}-php
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,enable=${{ github.event_name != 'workflow_dispatch' }},event=branch
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},value=pr-${{ inputs.pull_request_number }}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand Down
3 changes: 3 additions & 0 deletions app/Ejaculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ protected static function boot()
self::creating(function (Ejaculation $ejaculation) {
$ejaculation->normalized_link = app(Formatter::class)->normalizeUrl($ejaculation->link);
});
self::updating(function (Ejaculation $ejaculation) {
$ejaculation->normalized_link = app(Formatter::class)->normalizeUrl($ejaculation->link);
});
}

public function user()
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/UserCollectionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function index(User $user)
throw new AccessDeniedHttpException('このユーザはチェックイン履歴を公開していません');
}

$collections = $user->collections();
$collections = $user->collections()->orderBy('id');
if (!$user->isMe()) {
$collections = $collections->where('is_private', false);
}
Expand Down

0 comments on commit 4c5bac5

Please sign in to comment.