Compare commits

..

1 Commits

Author SHA1 Message Date
socksprox
b547da47b1
Merge d41909d564 into 1dfd7fa8c5 2025-02-07 08:09:30 +00:00
3 changed files with 10 additions and 29 deletions

View File

@ -33,17 +33,7 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
driver-opts: |
image=moby/buildkit:master
network=host
# Add free disk space
- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune -af
image=moby/buildkit:latest
- name: Login to registry
uses: docker/login-action@v3
@ -87,12 +77,7 @@ jobs:
${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard:${{ steps.get_version.outputs.version }}
build-args: |
BUILDKIT_INLINE_CACHE=1
BUILDKIT_MULTI_PLATFORM=1
DOCKER_BUILDKIT=1
provenance: false
outputs: type=registry,push=true
allow: |
network.host
- name: Install cosign
uses: sigstore/cosign-installer@v3.4.0

View File

@ -3,8 +3,8 @@ FROM phpswoole/swoole:php8.2-alpine
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
# Install PHP extensions one by one with lower optimization level for ARM64 compatibility
RUN CFLAGS="-O0" install-php-extensions pcntl && \
CFLAGS="-O0 -g0" install-php-extensions bcmath && \
RUN CFLAGS="-O1" install-php-extensions pcntl && \
CFLAGS="-O1" install-php-extensions bcmath && \
install-php-extensions zip && \
install-php-extensions redis && \
apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis && \

View File

@ -2,9 +2,6 @@
namespace App\Http\Resources;
use App\Models\Coupon;
use App\Services\CouponService;
use App\Services\PlanService;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
@ -25,14 +22,13 @@ class CouponResource extends JsonResource
{
return [
...$this->resource->toArray(),
'limit_plan_ids' => empty($this->limit_plan_ids) ? null : collect($this->limit_plan_ids)
->map(fn(mixed $id): string => (string) $id)
->values()
->all(),
'limit_period' => empty($this->limit_period) ? null : collect($this->limit_period)
->map(fn(mixed $period): string => (string) PlanService::convertToLegacyPeriod($period))
->values()
->all(),
'limit_plan_ids' => $this->when(
!empty($this->limit_plan_ids),
fn() => collect($this->limit_plan_ids)
->map(fn(mixed $id): string => (string) $id)
->values()
->all()
)
];
}
}