mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-03-13 08:18:14 -04:00
Compare commits
5 Commits
d41909d564
...
c7f39808bc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c7f39808bc | ||
![]() |
8e5732d857 | ||
![]() |
2fb6691ca6 | ||
![]() |
b3339f7fe0 | ||
![]() |
68d42a514f |
17
.github/workflows/docker-publish.yml
vendored
17
.github/workflows/docker-publish.yml
vendored
@ -33,7 +33,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
driver-opts: |
|
driver-opts: |
|
||||||
image=moby/buildkit:latest
|
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
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
@ -77,7 +87,12 @@ jobs:
|
|||||||
${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard:${{ steps.get_version.outputs.version }}
|
${{ env.REGISTRY }}/${{ github.repository_owner }}/xboard:${{ steps.get_version.outputs.version }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILDKIT_INLINE_CACHE=1
|
BUILDKIT_INLINE_CACHE=1
|
||||||
|
BUILDKIT_MULTI_PLATFORM=1
|
||||||
|
DOCKER_BUILDKIT=1
|
||||||
provenance: false
|
provenance: false
|
||||||
|
outputs: type=registry,push=true
|
||||||
|
allow: |
|
||||||
|
network.host
|
||||||
|
|
||||||
- name: Install cosign
|
- name: Install cosign
|
||||||
uses: sigstore/cosign-installer@v3.4.0
|
uses: sigstore/cosign-installer@v3.4.0
|
||||||
|
@ -3,8 +3,8 @@ FROM phpswoole/swoole:php8.2-alpine
|
|||||||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
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
|
# Install PHP extensions one by one with lower optimization level for ARM64 compatibility
|
||||||
RUN CFLAGS="-O1" install-php-extensions pcntl && \
|
RUN CFLAGS="-O0" install-php-extensions pcntl && \
|
||||||
CFLAGS="-O1" install-php-extensions bcmath && \
|
CFLAGS="-O0 -g0" install-php-extensions bcmath && \
|
||||||
install-php-extensions zip && \
|
install-php-extensions zip && \
|
||||||
install-php-extensions redis && \
|
install-php-extensions redis && \
|
||||||
apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis && \
|
apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis && \
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Http\Resources;
|
namespace App\Http\Resources;
|
||||||
|
|
||||||
|
use App\Models\Coupon;
|
||||||
|
use App\Services\CouponService;
|
||||||
|
use App\Services\PlanService;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
|
|
||||||
@ -22,13 +25,14 @@ class CouponResource extends JsonResource
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
...$this->resource->toArray(),
|
...$this->resource->toArray(),
|
||||||
'limit_plan_ids' => $this->when(
|
'limit_plan_ids' => empty($this->limit_plan_ids) ? null : collect($this->limit_plan_ids)
|
||||||
!empty($this->limit_plan_ids),
|
->map(fn(mixed $id): string => (string) $id)
|
||||||
fn() => collect($this->limit_plan_ids)
|
->values()
|
||||||
->map(fn(mixed $id): string => (string) $id)
|
->all(),
|
||||||
->values()
|
'limit_period' => empty($this->limit_period) ? null : collect($this->limit_period)
|
||||||
->all()
|
->map(fn(mixed $period): string => (string) PlanService::convertToLegacyPeriod($period))
|
||||||
)
|
->values()
|
||||||
|
->all(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user